| SMLDoc |
structure ElaboratedAst =
struct
type loc = AnnotatedAst.loc
type path = string list
type moduleFQN = (moduleType * string) list
type typeReference = moduleReference * path
type exceptionReference = moduleReference * path
type tyvar = string
type docComment = string * string * tagSet
type optDocComment = (string * string * tagSet) option
datatype moduleType =
STRUCTURE
| SIGNATURE
| FUNCTOR
| FUNCTORSIGNATURE
| FUNCTORPARAMETER_STRUCTURE
| ANONYMOUS_FUNCTORPARAMETER_STRUCTURE
datatype moduleReference =
UnknownRef of path
| ModuleRef of moduleFQN * path
| ExternalRef of moduleFQN * string
datatype 'a sigConst = NoSig | Transparent of 'a | Opaque of 'a
datatype strexp =
VarStr of moduleReference
| BaseStr of decSet
| ConstrainedStr of strexp * sigexp sigConst
| AppStr of moduleReference * (strexp * bool) list
datatype fctexp =
VarFct of moduleReference * fsigexp sigConst
| BaseFct of
{
params : (string option * sigexp) list,
body : strexp,
constraint : sigexp sigConst
}
| AppFct of moduleReference * (strexp * bool) list * fsigexp sigConst
datatype wherespec =
WhType of string list * tyvar list * ty
| WhStruct of string list * moduleReference
datatype sigexp =
VarSig of moduleReference
| AugSig of sigexp * wherespec list list
| BaseSig of specSet
datatype fsigexp =
VarFsig of moduleReference
| BaseFsig of {params : (string option * sigexp) list, result : sigexp}
datatype specSet =
SpecSet of
{
strs : sigb list,
fcts : fsigb list,
shareStrs : moduleReference list list,
shareTycs : typeReference list list,
includes : sigexp list,
types : tb list,
datatypes : db list,
exceptions : eb list,
vals : vb list
}
datatype decSet =
DecSet of
{
strs : strb list,
fcts : fctb list,
sigs : sigb list,
fsigs : fsigb list,
opens : moduleReference list,
types : tb list,
datatypes : db list,
exceptions : eb list,
vals : vb list
}
datatype strb =
STRB of
moduleFQN * string * loc * strexp * sigexp sigConst * optDocComment
datatype fctb = FCTB of moduleFQN * string * loc * fctexp * optDocComment
datatype sigb =
SIGB of
moduleFQN * string * loc * sigexp * path option * optDocComment
datatype fsigb = FSIGB of moduleFQN * string * loc * fsigexp * optDocComment
datatype tb =
TB of
moduleFQN *
string *
loc *
tyvar list *
ty option *
bool *
optDocComment
datatype db =
DB of moduleFQN * string * loc * tyvar list * dbrhs * optDocComment
datatype vb = VB of moduleFQN * string * loc * ty option * optDocComment
datatype dbrhs = Constrs of cb list | Repl of typeReference
datatype cb = CB of moduleFQN * string * loc * ty option * ty * optDocComment
datatype eb =
EBGen of moduleFQN * string * loc * ty option * optDocComment
| EBDef of
moduleFQN * string * loc * exceptionReference * optDocComment
datatype ty =
VarTy of tyvar
| ConTy of typeReference * ty list
| FunTy of ty * ty
| RecordTy of (string * ty * optDocComment) list
| TupleTy of ty list
| CommentedTy of docComment * ty
datatype paramPattern =
IDParamPat of string * ty option
| TupleParamPat of paramPattern list
| RecordParamPat of (string * paramPattern) list
datatype tagSet =
TagSet of
{
authors : string list,
contributors : string list,
copyrights : string list,
exceptions : (exceptionReference * string) list,
params : (string * ty option * string) list,
paramPattern : paramPattern list option,
return : string option,
sees : string list,
version : string option
}
datatype compileUnit = CompileUnit of string * decSet
val pathToString
val moduleFQNToPath
val moduleFQNToString
val isFQNOfFunctorParameter
val emptySpecSet
val appendSpecSet
val emptyDecSet
val appendDecSet
end
Type detail |
---|
type loc = AnnotatedAst.loc
type moduleFQN = (moduleType * string) list
type typeReference = moduleReference * path
type exceptionReference = moduleReference * path
type tyvar = string
type docComment = string * string * tagSet
type optDocComment = (string * string * tagSet) option
Datatype detail |
---|
datatype moduleType =
STRUCTURE
| SIGNATURE
| FUNCTOR
| FUNCTORSIGNATURE
| FUNCTORPARAMETER_STRUCTURE
| ANONYMOUS_FUNCTORPARAMETER_STRUCTURE
datatype moduleReference =
UnknownRef of path
| ModuleRef of
(* absolute FQN of the dest module used to link.*)
moduleFQN * (* relative path used as display string .*) path
| ExternalRef of moduleFQN * string
datatype 'a sigConst = NoSig | Transparent of 'a | Opaque of 'a
datatype strexp =
VarStr of moduleReference
| BaseStr of decSet
| ConstrainedStr of strexp * sigexp sigConst
| AppStr of moduleReference * (strexp * bool) list
datatype fctexp =
VarFct of moduleReference * fsigexp sigConst
| BaseFct of
{
params : (string option * sigexp) list,
body : strexp,
constraint : sigexp sigConst
}
| AppFct of moduleReference * (strexp * bool) list * fsigexp sigConst
datatype wherespec =
WhType of string list * tyvar list * ty
| WhStruct of string list * moduleReference
datatype sigexp =
VarSig of moduleReference
| AugSig of sigexp * wherespec list list
| BaseSig of specSet
datatype fsigexp =
VarFsig of moduleReference
| BaseFsig of {params : (string option * sigexp) list, result : sigexp}
datatype specSet =
SpecSet of
{
(* structure *) strs : sigb list,
(* functor *) fcts : fsigb list,
(* structure sharing *) shareStrs : moduleReference list list,
(* type sharing *) shareTycs : typeReference list list,
(* include specif *) includes : sigexp list,
(* types *) types : tb list,
(* datatype *) datatypes : db list,
(* exception *) exceptions : eb list,
(* value *) vals : vb list
}
datatype decSet =
DecSet of
{
(* structure *) strs : strb list,
(* functor *) fcts : fctb list,
(* signature *) sigs : sigb list,
(* funsig *) fsigs : fsigb list,
(* opens *) opens : moduleReference list,
(* type dec *) types : tb list,
(* datatype dec *) datatypes : db list,
(* exception *) exceptions : eb list,
(* values *) vals : vb list
}
datatype strb =
STRB of
moduleFQN * string * loc * strexp * sigexp sigConst * optDocComment
datatype fctb = FCTB of moduleFQN * string * loc * fctexp * optDocComment
datatype sigb =
SIGB of moduleFQN * string * loc * sigexp * path option * optDocComment
datatype fsigb = FSIGB of moduleFQN * string * loc * fsigexp * optDocComment
datatype tb =
TB of
moduleFQN *
string *
loc *
tyvar list *
ty option *
(* isEqtype *) bool *
optDocComment
datatype db =
DB of moduleFQN * string * loc * tyvar list * dbrhs * optDocComment
datatype vb = VB of moduleFQN * string * loc * ty option * optDocComment
datatype dbrhs = Constrs of cb list | Repl of typeReference
datatype cb = CB of moduleFQN * string * loc * ty option * ty * optDocComment
datatype eb =
EBGen of moduleFQN * string * loc * ty option * optDocComment
| EBDef of moduleFQN * string * loc * exceptionReference * optDocComment
datatype ty =
VarTy of tyvar
| ConTy of typeReference * ty list
| FunTy of ty * ty
| RecordTy of (string * ty * optDocComment) list
| TupleTy of ty list
| CommentedTy of docComment * ty
datatype paramPattern =
IDParamPat of string * ty option
| TupleParamPat of paramPattern list
| RecordParamPat of (string * paramPattern) list
datatype tagSet =
TagSet of
{
authors : string list,
contributors : string list,
copyrights : string list,
exceptions : (exceptionReference * string) list,
params : (string * ty option * string) list,
paramPattern : paramPattern list option,
return : string option,
sees : string list,
version : string option
}
datatype compileUnit = CompileUnit of string * decSet
DataConstructor detail |
---|
constructor STRUCTURE : moduleType
constructor SIGNATURE : moduleType
constructor FUNCTOR : moduleType
constructor FUNCTORSIGNATURE : moduleType
constructor FUNCTORPARAMETER_STRUCTURE : moduleType
constructor ANONYMOUS_FUNCTORPARAMETER_STRUCTURE : moduleType
constructor UnknownRef : path -> moduleReference
constructor ModuleRef
: (* absolute FQN of the dest module used to link.*)
moduleFQN * (* relative path used as display string .*) path ->
moduleReference
constructor ExternalRef : moduleFQN * string -> moduleReference
constructor NoSig : 'a sigConst
constructor Transparent : 'a -> 'a sigConst
constructor Opaque : 'a -> 'a sigConst
constructor VarStr : moduleReference -> strexp
constructor BaseStr : decSet -> strexp
constructor ConstrainedStr : strexp * sigexp sigConst -> strexp
constructor AppStr : moduleReference * (strexp * bool) list -> strexp
constructor VarFct : moduleReference * fsigexp sigConst -> fctexp
constructor BaseFct
: {
params : (string option * sigexp) list,
body : strexp,
constraint : sigexp sigConst
} ->
fctexp
constructor AppFct
: moduleReference * (strexp * bool) list * fsigexp sigConst ->
fctexp
constructor WhType : string list * tyvar list * ty -> wherespec
constructor WhStruct : string list * moduleReference -> wherespec
constructor VarSig : moduleReference -> sigexp
constructor AugSig : sigexp * wherespec list list -> sigexp
constructor BaseSig : specSet -> sigexp
constructor VarFsig : moduleReference -> fsigexp
constructor BaseFsig
: {params : (string option * sigexp) list, result : sigexp} ->
fsigexp
constructor SpecSet
: {
(* structure *) strs : sigb list,
(* functor *) fcts : fsigb list,
(* structure sharing *) shareStrs : moduleReference list list,
(* type sharing *) shareTycs : typeReference list list,
(* include specif *) includes : sigexp list,
(* types *) types : tb list,
(* datatype *) datatypes : db list,
(* exception *) exceptions : eb list,
(* value *) vals : vb list
} ->
specSet
constructor DecSet
: {
(* structure *) strs : strb list,
(* functor *) fcts : fctb list,
(* signature *) sigs : sigb list,
(* funsig *) fsigs : fsigb list,
(* opens *) opens : moduleReference list,
(* type dec *) types : tb list,
(* datatype dec *) datatypes : db list,
(* exception *) exceptions : eb list,
(* values *) vals : vb list
} ->
decSet
constructor STRB
: moduleFQN *
string *
loc *
strexp *
sigexp sigConst *
optDocComment ->
strb
constructor FCTB : moduleFQN * string * loc * fctexp * optDocComment -> fctb
constructor SIGB
: moduleFQN * string * loc * sigexp * path option * optDocComment ->
sigb
constructor FSIGB : moduleFQN * string * loc * fsigexp * optDocComment -> fsigb
constructor TB
: moduleFQN *
string *
loc *
tyvar list *
ty option *
(* isEqtype *) bool *
optDocComment ->
tb
constructor DB
: moduleFQN * string * loc * tyvar list * dbrhs * optDocComment ->
db
constructor VB : moduleFQN * string * loc * ty option * optDocComment -> vb
constructor Constrs : cb list -> dbrhs
constructor Repl : typeReference -> dbrhs
constructor CB : moduleFQN * string * loc * ty option * ty * optDocComment -> cb
constructor EBGen : moduleFQN * string * loc * ty option * optDocComment -> eb
constructor EBDef
: moduleFQN * string * loc * exceptionReference * optDocComment ->
eb
constructor VarTy : tyvar -> ty
constructor ConTy : typeReference * ty list -> ty
constructor FunTy : ty * ty -> ty
constructor RecordTy : (string * ty * optDocComment) list -> ty
constructor TupleTy : ty list -> ty
constructor CommentedTy : docComment * ty -> ty
constructor IDParamPat : string * ty option -> paramPattern
constructor TupleParamPat : paramPattern list -> paramPattern
constructor RecordParamPat : (string * paramPattern) list -> paramPattern
constructor TagSet
: {
authors : string list,
contributors : string list,
copyrights : string list,
exceptions : (exceptionReference * string) list,
params : (string * ty option * string) list,
paramPattern : paramPattern list option,
return : string option,
sees : string list,
version : string option
} ->
tagSet
constructor CompileUnit : string * decSet -> compileUnit
Value detail |
---|
val pathToString
val moduleFQNToPath
val moduleFQNToString
val isFQNOfFunctorParameter
val emptySpecSet
val appendSpecSet
val emptyDecSet
val appendDecSet
| SMLDoc: Documentation generator for SML |