module MiniKindInferencer: sig
.. end
This module provides a simple inference engine for the kinds
of the Mini type system.
The language to infer the kind on.
type
t
Internal kind representation.
type
env = (MiniAst.tname -> t) *
(MiniAst.tname -> t -> unit)
The kind inference engine uses an environment implemented by
two functions (get, add).
val fresh_kind : unit -> t
fresh_kind
returns a fresh kind for a type.
val infer : env -> MiniAst.typ -> t
infer env typ
infers a kind for typ
.
val intern_kind : env -> MiniAst.kind -> t
intern_kind env kind
internalizes a kind in the user-syntax.
val check : Positions.position ->
env -> MiniAst.typ -> t -> unit
check pos env typ kind
verifies that typ
can be given the kind
kind
.
val star : t
star
is the kind of ml values.