Commit 439186cd authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Allow compilation of patterns to succeed even when the variables of the...

Allow compilation of patterns to succeed even when the variables of the expected input type cannot be erased.
parent 802f291e
......@@ -1403,9 +1403,15 @@ module Compile = struct
let make_branches t b =
let open Debug in
_DEBUG "pat_comp" "@[make_branches type is: %a@]@\n" Types.Print.pp_type t;
try
make_branches t b
with
FindCode -> make_branches (Types.Subst.hide_vars t) b
FindCode ->
try
make_branches (Types.Subst.hide_vars t) b
with
FindCode -> make_branches Types.any b
end
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