Commit 4f34dfda authored by Andrei Paskevich's avatar Andrei Paskevich

bugfix in Encoding_explicit

parent 9f22cd9f
......@@ -269,13 +269,13 @@ let () = Exn_printer.register (fun fmt exn -> match exn with
| Unsupported s ->
fprintf fmt "@[<hov 3> Uncatched exception 'Unsupported %s'@]" s
| UnsupportedType (e,s) ->
fprintf fmt "@[<hov 3> This type isn't supported:@\n%a@\n%s@]"
fprintf fmt "@[@[<hov 3> This type isn't supported:@\n%a@]@\n %s@]"
Pretty.print_ty e s
| UnsupportedTerm (e,s) ->
fprintf fmt "@[<hov 3> This expression isn't supported:@\n%a@\n%s@]"
fprintf fmt "@[@[<hov 3> This expression isn't supported:@\n%a@]@\n %s@]"
Pretty.print_term e s
| UnsupportedDecl (d,s) ->
fprintf fmt "@[<hov 3> This declaration isn't supported:@\n%a@\n%s@]"
fprintf fmt "@[@[<hov 3> This declaration isn't supported:@\n%a@]@\n %s@]"
Pretty.print_decl d s
| NotImplemented (s) ->
fprintf fmt "@[<hov 3> Unimplemented feature:@\n%s@]" s
......
......@@ -129,14 +129,14 @@ let explicit = Trans.decl decl (Task.add_decl None d_ts_type)
let explicit =
Trans.on_tagged_ty Libencoding.meta_kept (fun kept ->
Trans.on_tagged_ts Eliminate_algebraic.meta_enum (fun enum ->
let check ts = ts.ts_args = [] && Sty.mem (ty_app ts []) kept in
let check ts = not (ts.ts_args = [] && Sty.mem (ty_app ts []) kept) in
let enum = Sts.filter check enum in
if Sts.is_empty enum then explicit
else
let ts = Sts.choose enum in
let ty = ty_app ts (List.map ty_var ts.ts_args) in
Printer.unsupportedType ty
"explicit is unsound in presence of type"))
"Encoding_explicit is unsound in presence of unprotected finite types"))
(** {2 monomorphise task } *)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment