Dear OCaml type inference experts,
If I infer the type (using Typemod.type_structure) of:
let a = 1 in fun x -> 1
and see if the type of x is more general (using Ctype.moregeneral)
than the type of a type variable (Btype.newgenvar ()), I obtain yes
(since the type of x is 'a which is more general (or equal) than a
newly created type variable, I guess). If I do the same for:
let a = assert false in fun x -> 1
I obtain no, although it still seems that the type of x is the same
'a. (See attached file for the concrete program I executed. I used
OCaml 4.04.0.) Why?
Thank you in advance!
--
Kenichi Asai
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs