This PR contains the current state of reptypes, to be merged so that mi-ocaml can build against miking proper rather than my branch.
Reptypes are not included in the compiler at present, only in the standard library so that other compilers can use them.
Other changes that might be relevant to others:
_ in a type is now parsed as a type variable (i.e., as though it said #var"_").
The type and constructor definitions for Option, Either, and These are moved to a new file basic-types.mc, in preparation for a larger move to use UCTs eventually (this lets us have these types in UCT operations, and also use UCTs in option.mc etc.).
New functions in error.mc for warnings, with the same interface as for errors (e.g., warnSingle).
New data types: a heap in heap.mc and lazy values and streams in lazy.mc.
Minor support for proper escaping when using annotate.mc, and a language fragment PprintTyAnnot that (very hackily) pprints code and annotates it with the interactive html-stuff showing the type of each expression.
This PR contains the current state of reptypes, to be merged so that mi-ocaml can build against
miking
proper rather than my branch.Reptypes are not included in the compiler at present, only in the standard library so that other compilers can use them.
Other changes that might be relevant to others:
_
in a type is now parsed as a type variable (i.e., as though it said#var"_"
).Option
,Either
, andThese
are moved to a new filebasic-types.mc
, in preparation for a larger move to use UCTs eventually (this lets us have these types in UCT operations, and also use UCTs inoption.mc
etc.).error.mc
for warnings, with the same interface as for errors (e.g.,warnSingle
).heap.mc
and lazy values and streams inlazy.mc
.annotate.mc
, and a language fragmentPprintTyAnnot
that (very hackily)pprint
s code and annotates it with the interactive html-stuff showing the type of each expression.