News for hackers. Stuff that matters.
Re:OCaml Modules: Think Immutable Singletons by DonPellegrino on Sunday May 24, 2015 @04:16PM (#9597418)
You sort of can with functors or GADTs.
Re:OCaml Modules: Think Immutable Singletons by lindig on Sunday May 24, 2015 @04:24PM (#9597447)
Like you say, sort of. This would imply that you wrap all the basic types in a sum type. It's quite heavy. Using the PPX mechanism the compiler can also be extended to generate this code automatically but again, this isn't very natural at the moment.