| SMLDoc |
structure AnnotatedAst =
struct
type loc = {fileName : string, line : int, column : int}
type path = string list
type tyvar = string
type optDocComment = DocComment.docComment option
datatype 'a sigConst = NoSig | Transparent of 'a | Opaque of 'a
datatype strexp =
VarStr of path
| BaseStr of dec list
| ConstrainedStr of strexp * sigexp sigConst
| AppStr of path * (strexp * bool) list
| LetStr of dec list * strexp
datatype fctexp =
VarFct of path * fsigexp sigConst
| BaseFct of
{
params : (string option * sigexp) list,
body : strexp,
constraint : sigexp sigConst
}
| AppFct of path * (strexp * bool) list * fsigexp sigConst
| LetFct of dec list * fctexp
datatype wherespec =
WhType of string list * tyvar list * ty
| WhStruct of string list * string list
datatype sigexp =
VarSig of string
| AugSig of sigexp * wherespec list
| BaseSig of spec list
datatype fsigexp =
VarFsig of string
| BaseFsig of {params : (string option * sigexp) list, result : sigexp}
datatype spec =
StrSpec of string * loc * sigexp * path option * optDocComment
| TycSpec of
string * loc * tyvar list * ty option * bool * optDocComment
| FctSpec of string * loc * fsigexp * optDocComment
| ValSpec of string * loc * ty * optDocComment
| DataSpec of {datatycs : db list, withtycs : tb list}
| ExceSpec of string * loc * ty option * optDocComment
| ShareStrSpec of path list
| ShareTycSpec of path list
| IncludeSpec of sigexp
datatype dec =
ValDec of string * loc * optDocComment
| FunDec of string * loc * optDocComment
| TypeDec of tb
| DatatypeDec of {datatycs : db list, withtycs : tb list}
| AbstypeDec of
{datatycs : db list, withtycs : tb list, body : dec list}
| ExceptionDec of eb
| StrDec of string * loc * strexp * sigexp sigConst * optDocComment
| FctDec of string * loc * fctexp * optDocComment
| SigDec of string * loc * sigexp * optDocComment
| FsigDec of string * loc * fsigexp * optDocComment
| LocalDec of dec list * dec list
| OpenDec of path
datatype tb = Tb of string * loc * tyvar list * ty option * optDocComment
datatype db =
Db of
{tyc : string, loc : loc, tyvars : tyvar list, rhs : dbrhs} *
optDocComment
datatype dbrhs =
Constrs of (string * loc * ty option * optDocComment) list
| Repl of string list
datatype eb =
EbGen of string * loc * ty option * optDocComment
| EbDef of string * loc * path * optDocComment
datatype ty =
VarTy of tyvar
| ConTy of string list * ty list
| RecordTy of (string * ty * optDocComment) list
| TupleTy of ty list
| CommentedTy of DocComment.docComment * ty
datatype compileUnit = CompileUnit of string * dec list
end
Type detail |
---|
type loc = {fileName : string, line : int, column : int}
type tyvar = string
type optDocComment = DocComment.docComment option
Datatype detail |
---|
datatype 'a sigConst = NoSig | Transparent of 'a | Opaque of 'a
datatype strexp =
VarStr of path
| BaseStr of dec list
| ConstrainedStr of strexp * sigexp sigConst
| AppStr of path * (strexp * bool) list
| LetStr of dec list * strexp
datatype fctexp =
VarFct of path * fsigexp sigConst
| BaseFct of
{
params : (string option * sigexp) list,
body : strexp,
constraint : sigexp sigConst
}
| AppFct of path * (strexp * bool) list * fsigexp sigConst
| LetFct of dec list * fctexp
datatype wherespec =
WhType of string list * tyvar list * ty
| WhStruct of string list * string list
datatype sigexp =
VarSig of string
| AugSig of sigexp * wherespec list
| BaseSig of spec list
datatype fsigexp =
VarFsig of string
| BaseFsig of {params : (string option * sigexp) list, result : sigexp}
datatype spec =
StrSpec of string * loc * sigexp * path option * optDocComment
| TycSpec of string * loc * tyvar list * ty option * bool * optDocComment
| FctSpec of string * loc * fsigexp * optDocComment
| ValSpec of string * loc * ty * optDocComment
| DataSpec of {datatycs : db list, withtycs : tb list}
| ExceSpec of string * loc * ty option * optDocComment
| ShareStrSpec of path list
| ShareTycSpec of path list
| IncludeSpec of sigexp
datatype dec =
ValDec of string * loc * optDocComment
| FunDec of string * loc * optDocComment
| TypeDec of tb
| DatatypeDec of {datatycs : db list, withtycs : tb list}
| AbstypeDec of {datatycs : db list, withtycs : tb list, body : dec list}
| ExceptionDec of eb
| StrDec of string * loc * strexp * sigexp sigConst * optDocComment
| FctDec of string * loc * fctexp * optDocComment
| SigDec of string * loc * sigexp * optDocComment
| FsigDec of string * loc * fsigexp * optDocComment
| LocalDec of dec list * dec list
| OpenDec of path
datatype tb = Tb of string * loc * tyvar list * ty option * optDocComment
datatype db =
Db of
{tyc : string, loc : loc, tyvars : tyvar list, rhs : dbrhs} *
optDocComment
datatype dbrhs =
Constrs of (string * loc * ty option * optDocComment) list
| Repl of string list
datatype eb =
EbGen of string * loc * ty option * optDocComment
| EbDef of string * loc * path * optDocComment
datatype ty =
VarTy of tyvar
| ConTy of string list * ty list
| RecordTy of (string * ty * optDocComment) list
| TupleTy of ty list
| CommentedTy of DocComment.docComment * ty
datatype compileUnit = CompileUnit of string * dec list
DataConstructor detail |
---|
constructor NoSig : 'a sigConst
constructor Transparent : 'a -> 'a sigConst
constructor Opaque : 'a -> 'a sigConst
constructor VarStr : path -> strexp
constructor BaseStr : dec list -> strexp
constructor ConstrainedStr : strexp * sigexp sigConst -> strexp
constructor AppStr : path * (strexp * bool) list -> strexp
constructor LetStr : dec list * strexp -> strexp
constructor VarFct : path * fsigexp sigConst -> fctexp
constructor BaseFct
: {
params : (string option * sigexp) list,
body : strexp,
constraint : sigexp sigConst
} ->
fctexp
constructor AppFct : path * (strexp * bool) list * fsigexp sigConst -> fctexp
constructor LetFct : dec list * fctexp -> fctexp
constructor WhType : string list * tyvar list * ty -> wherespec
constructor WhStruct : string list * string list -> wherespec
constructor VarSig : string -> sigexp
constructor AugSig : sigexp * wherespec list -> sigexp
constructor BaseSig : spec list -> sigexp
constructor VarFsig : string -> fsigexp
constructor BaseFsig
: {params : (string option * sigexp) list, result : sigexp} ->
fsigexp
constructor StrSpec
: string * loc * sigexp * path option * optDocComment -> spec
constructor TycSpec
: string * loc * tyvar list * ty option * bool * optDocComment ->
spec
constructor FctSpec : string * loc * fsigexp * optDocComment -> spec
constructor ValSpec : string * loc * ty * optDocComment -> spec
constructor DataSpec : {datatycs : db list, withtycs : tb list} -> spec
constructor ExceSpec : string * loc * ty option * optDocComment -> spec
constructor ShareStrSpec : path list -> spec
constructor ShareTycSpec : path list -> spec
constructor IncludeSpec : sigexp -> spec
constructor ValDec : string * loc * optDocComment -> dec
constructor FunDec : string * loc * optDocComment -> dec
constructor TypeDec : tb -> dec
constructor DatatypeDec : {datatycs : db list, withtycs : tb list} -> dec
constructor AbstypeDec
: {datatycs : db list, withtycs : tb list, body : dec list} -> dec
constructor ExceptionDec : eb -> dec
constructor StrDec
: string * loc * strexp * sigexp sigConst * optDocComment -> dec
constructor FctDec : string * loc * fctexp * optDocComment -> dec
constructor SigDec : string * loc * sigexp * optDocComment -> dec
constructor FsigDec : string * loc * fsigexp * optDocComment -> dec
constructor LocalDec : dec list * dec list -> dec
constructor OpenDec : path -> dec
constructor Tb : string * loc * tyvar list * ty option * optDocComment -> tb
constructor Db
: {tyc : string, loc : loc, tyvars : tyvar list, rhs : dbrhs} *
optDocComment ->
db
constructor Constrs : (string * loc * ty option * optDocComment) list -> dbrhs
constructor Repl : string list -> dbrhs
constructor EbGen : string * loc * ty option * optDocComment -> eb
constructor EbDef : string * loc * path * optDocComment -> eb
constructor VarTy : tyvar -> ty
constructor ConTy : string list * ty list -> ty
constructor RecordTy : (string * ty * optDocComment) list -> ty
constructor TupleTy : ty list -> ty
constructor CommentedTy : DocComment.docComment * ty -> ty
constructor CompileUnit : string * dec list -> compileUnit
| SMLDoc: Documentation generator for SML |