Overview  Index  Help 
SMLDoc

AST

All Known Implementing Modules:

AstAstUtil


signature AST =
sig
  type srcpos
  type region
  type path
  type tyvar = string
  type exp = unit
  datatype fixity = INfix of int | INfixR of int | NONfix
  datatype 'a sigConst = NoSig | Transparent of 'a | Opaque of 'a
  datatype rule = Rule of {pat : pat, exp : exp}
  datatype pat =
           WildPat
         | VarPat of path
         | IntPat of int
         | WordPat of int
         | StringPat of string
         | CharPat of string
         | RecordPat of {def : (string * patlist, flexibility : bool}
         | ListPat of pat list
         | TuplePat of pat list
         | FlatAppPat of pat list
         | ConstraintPat of {pattern : pat, constraint : ty}
         | LayeredPat of {varPat : pat, expPat : pat}
         | VectorPat of pat list
         | MarkPat of pat * region
         | OrPat of pat list
  datatype strexp =
           VarStr of path
         | BaseStr of srcpos * dec
         | ConstrainedStr of strexp * sigexp sigConst
         | AppStr of path * (strexp * bool) list
         | LetStr of srcpos * dec * strexp
         | MarkStr of strexp * region
  datatype fctexp =
           VarFct of path * fsigexp sigConst
         | BaseFct of
           {
             params : (string option * sigexplist,
             body : strexp,
             constraint : sigexp sigConst
           }
         | LetFct of srcpos * dec * fctexp
         | AppFct of path * (strexp * bool) list * fsigexp sigConst
         | MarkFct of fctexp * region
  datatype wherespec =
           WhType of string list * tyvar list * srcpos * ty
         | WhStruct of string list * string list
  datatype sigexp =
           VarSig of string
         | AugSig of sigexp * wherespec list
         | BaseSig of srcpos * (spec * srcposlist
         | MarkSig of sigexp * region
  datatype fsigexp =
           VarFsig of string
         | BaseFsig of {params : (string option * sigexplist, result : sigexp}
         | MarkFsig of fsigexp * region
  datatype spec =
           StrSpec of (((string * sigexp * path option) * region) * srcposlist
         | TycSpec of
           (((string * tyvar list * srcpos * ty option) * region) * srcposlist *
           bool
         | FctSpec of (((string * fsigexp) * region) * srcposlist
         | ValSpec of (((string * srcpos * ty) * region) * srcposlist
         | DataSpec of
           {
             datatycs : (db * srcposlist,
             withtycsBeginPos : srcpos,
             withtycs : (tb * srcposlist
           }
         | ExceSpec of (((string * srcpos * ty option) * region) * srcposlist
         | ShareStrSpec of path list
         | ShareTycSpec of path list
         | IncludeSpec of sigexp
  datatype dec =
           ValDec of (vb * srcposlist * tyvar list
         | ValrecDec of (rvb * srcposlist * tyvar list
         | FunDec of (fb * srcposlist * tyvar list
         | TypeDec of (tb * srcposlist
         | DatatypeDec of
           {
             datatycs : (db * srcposlist,
             withtycsBeginPos : srcpos,
             withtycs : (tb * srcposlist
           }
         | AbstypeDec of
           {
             abstycs : (db * srcposlist,
             withtycsBeginPos : srcpos,
             withtycs : (tb * srcposlist,
             bodyBeginPos : srcpos,
             body : dec
           }
         | ExceptionDec of (eb * srcposlist
         | StrDec of (strb * srcposlist
         | AbsDec of (strb * srcposlist
         | FctDec of (fctb * srcposlist
         | SigDec of (sigb * srcposlist
         | FsigDec of (fsigb * srcposlist
         | LocalDec of srcpos * dec * srcpos * dec
         | SeqDec of (dec * srcposlist
         | OpenDec of path list
         | OvldDec of string * ty * exp list
         | FixDec of {fixity : fixity, ops : string list}
         | UseDec of string
         | MarkDec of dec * region
  datatype vb = Vb of {pat : pat, exp : exp, lazyp : bool} * region
  datatype rvb =
           Rvb of
           {var : string, exp : exp, resultty : ty option, lazyp : bool} *
           region
  datatype fb = Fb of clause list * bool | MarkFb of fb * region
  datatype clause =
           Clause of {pats : pat list, resultty : ty option, exp : exp} * region
  datatype tb =
           Tb of
           {tyc : string, defBeginPos : srcpos, def : ty, tyvars : tyvar list} *
           region
  datatype db =
           Db of
           {
             tyc : string,
             tyvars : tyvar list,
             rhsBeginPos : srcpos,
             rhs : dbrhs,
             lazyp : bool
           } *
           region
  datatype dbrhs =
           Constrs of (((string * srcpos * ty option) * region) * srcposlist
         | Repl of string list
  datatype eb =
           EbGen of
           {exn : string, etypeBeginPos : srcpos, etype : ty option} * region
         | EbDef of {exn : string, edef : path} * region
  datatype strb =
           Strb of
           {name : string, def : strexp, constraint : sigexp sigConst} * region
  datatype fctb = Fctb of {name : string, def : fctexp} * region
  datatype sigb = Sigb of {name : string, def : sigexp} * region
  datatype fsigb = Fsigb of {name : string, def : fsigexp} * region
  datatype ty =
           VarTy of tyvar
         | ConTy of string list * srcpos * (ty * srcposlist
         | RecordTy of srcpos * (tyrow * srcposlist
         | TupleTy of (ty * srcposlist
         | EnclosedTy of srcpos * ty
         | MarkTy of ty * region
  datatype tyrow = TyRow of (string * srcpos * ty) * region
end

abstract syntax tree.

Author:
Copyright 1992 by AT&T Bell Laboratories , YAMATODANI Kiyoshi
Version:
$Id: SigAST.html,v 1.9 2007/02/17 07:01:57 kiyoshiy Exp $

 
Type detail

srcpos

type srcpos


region

type region


path

type path


tyvar

type tyvar = string


exp

type exp = unit

 
Datatype detail

fixity

datatype fixity = INfix of int | INfixR of int | NONfix


sigConst

datatype 'a sigConst = NoSig | Transparent of 'a | Opaque of 'a


rule

datatype rule = Rule of {pat : pat, exp : exp}


pat

datatype pat =
         WildPat
       | VarPat of path
       | IntPat of int
       | WordPat of int
       | StringPat of string
       | CharPat of string
       | RecordPat of {def : (string * patlist, flexibility : bool}
       | ListPat of pat list
       | TuplePat of pat list
       | FlatAppPat of pat list
       | ConstraintPat of {pattern : pat, constraint : ty}
       | LayeredPat of {varPat : pat, expPat : pat}
       | VectorPat of pat list
       | MarkPat of pat * region
       | OrPat of pat list


strexp

datatype strexp =
         VarStr of path
       | BaseStr of srcpos * dec
       | ConstrainedStr of strexp * sigexp sigConst
       | AppStr of path * (strexp * bool) list
       | LetStr of srcpos * dec * strexp
       | MarkStr of strexp * region


fctexp

datatype fctexp =
         VarFct of path * fsigexp sigConst
       | BaseFct of
         {
           params : (string option * sigexplist,
           body : strexp,
           constraint : sigexp sigConst
         }
       | LetFct of srcpos * dec * fctexp
       | AppFct of path * (strexp * bool) list * fsigexp sigConst
       | MarkFct of fctexp * region


wherespec

datatype wherespec =
         WhType of string list * tyvar list * srcpos * ty
       | WhStruct of string list * string list


sigexp

datatype sigexp =
         VarSig of string
       | AugSig of sigexp * wherespec list
       | BaseSig of srcpos * (spec * srcposlist
       | MarkSig of sigexp * region


fsigexp

datatype fsigexp =
         VarFsig of string
       | BaseFsig of {params : (string option * sigexplist, result : sigexp}
       | MarkFsig of fsigexp * region


spec

datatype spec =
         StrSpec of (((string * sigexp * path option) * region) * srcposlist
       | TycSpec of
         (((string * tyvar list * srcpos * ty option) * region) * srcposlist *
         bool
       | FctSpec of (((string * fsigexp) * region) * srcposlist
       | ValSpec of (((string * srcpos * ty) * region) * srcposlist
       | DataSpec of
         {
           datatycs : (db * srcposlist,
           withtycsBeginPos : srcpos,
           withtycs : (tb * srcposlist
         }
       | ExceSpec of (((string * srcpos * ty option) * region) * srcposlist
       | ShareStrSpec of path list
       | ShareTycSpec of path list
       | IncludeSpec of sigexp


dec

datatype dec =
         ValDec of (vb * srcposlist * tyvar list
       | ValrecDec of (rvb * srcposlist * tyvar list
       | FunDec of (fb * srcposlist * tyvar list
       | TypeDec of (tb * srcposlist
       | DatatypeDec of
         {
           datatycs : (db * srcposlist,
           withtycsBeginPos : srcpos,
           withtycs : (tb * srcposlist
         }
       | AbstypeDec of
         {
           abstycs : (db * srcposlist,
           withtycsBeginPos : srcpos,
           withtycs : (tb * srcposlist,
           bodyBeginPos : srcpos,
           body : dec
         }
       | ExceptionDec of (eb * srcposlist
       | StrDec of (strb * srcposlist
       | AbsDec of (strb * srcposlist
       | FctDec of (fctb * srcposlist
       | SigDec of (sigb * srcposlist
       | FsigDec of (fsigb * srcposlist
       | LocalDec of srcpos * dec * srcpos * dec
       | SeqDec of (dec * srcposlist
       | OpenDec of path list
       | OvldDec of string * ty * exp list
       | FixDec of {fixity : fixity, ops : string list}
       | UseDec of string
       | MarkDec of dec * region


vb

datatype vb = Vb of {pat : pat, exp : exp, lazyp : bool} * region


rvb

datatype rvb =
         Rvb of
         {var : string, exp : exp, resultty : ty option, lazyp : bool} * region


fb

datatype fb = Fb of clause list * bool | MarkFb of fb * region


clause

datatype clause =
         Clause of {pats : pat list, resultty : ty option, exp : exp} * region


tb

datatype tb =
         Tb of
         {tyc : string, defBeginPos : srcpos, def : ty, tyvars : tyvar list} *
         region


db

datatype db =
         Db of
         {
           tyc : string,
           tyvars : tyvar list,
           rhsBeginPos : srcpos,
           rhs : dbrhs,
           lazyp : bool
         } *
         region


dbrhs

datatype dbrhs =
         Constrs of (((string * srcpos * ty option) * region) * srcposlist
       | Repl of string list


eb

datatype eb =
         EbGen of
         {exn : string, etypeBeginPos : srcpos, etype : ty option} * region
       | EbDef of {exn : string, edef : path} * region


strb

datatype strb =
         Strb of
         {name : string, def : strexp, constraint : sigexp sigConst} * region


fctb

datatype fctb = Fctb of {name : string, def : fctexp} * region


sigb

datatype sigb = Sigb of {name : string, def : sigexp} * region


fsigb

datatype fsigb = Fsigb of {name : string, def : fsigexp} * region


ty

datatype ty =
         VarTy of tyvar
       | ConTy of string list * srcpos * (ty * srcposlist
       | RecordTy of srcpos * (tyrow * srcposlist
       | TupleTy of (ty * srcposlist
       | EnclosedTy of srcpos * ty
       | MarkTy of ty * region


tyrow

datatype tyrow = TyRow of (string * srcpos * ty) * region

 
DataConstructor detail

INfix

constructor INfix : int -> fixity


INfixR

constructor INfixR : int -> fixity


NONfix

constructor NONfix : fixity


NoSig

constructor NoSig : 'a sigConst


Transparent

constructor Transparent : 'a -> 'a sigConst


Opaque

constructor Opaque : 'a -> 'a sigConst


Rule

constructor Rule : {pat : pat, exp : exp} -> rule


WildPat

constructor WildPat : pat


VarPat

constructor VarPat : path -> pat


IntPat

constructor IntPat : int -> pat


WordPat

constructor WordPat : int -> pat


StringPat

constructor StringPat : string -> pat


CharPat

constructor CharPat : string -> pat


RecordPat

constructor RecordPat : {def : (string * patlist, flexibility : bool} -> pat


ListPat

constructor ListPat : pat list -> pat


TuplePat

constructor TuplePat : pat list -> pat


FlatAppPat

constructor FlatAppPat : pat list -> pat


ConstraintPat

constructor ConstraintPat : {pattern : pat, constraint : ty} -> pat


LayeredPat

constructor LayeredPat : {varPat : pat, expPat : pat} -> pat


VectorPat

constructor VectorPat : pat list -> pat


MarkPat

constructor MarkPat : pat * region -> pat


OrPat

constructor OrPat : pat list -> pat


VarStr

constructor VarStr : path -> strexp


BaseStr

constructor BaseStr : srcpos * dec -> strexp


ConstrainedStr

constructor ConstrainedStr : strexp * sigexp sigConst -> strexp


AppStr

constructor AppStr : path * (strexp * bool) list -> strexp


LetStr

constructor LetStr : srcpos * dec * strexp -> strexp


MarkStr

constructor MarkStr : strexp * region -> strexp


VarFct

constructor VarFct : path * fsigexp sigConst -> fctexp


BaseFct

constructor BaseFct
            : {
                params : (string option * sigexplist,
                body : strexp,
                constraint : sigexp sigConst
              } ->
                fctexp


LetFct

constructor LetFct : srcpos * dec * fctexp -> fctexp


AppFct

constructor AppFct : path * (strexp * bool) list * fsigexp sigConst -> fctexp


MarkFct

constructor MarkFct : fctexp * region -> fctexp


WhType

constructor WhType : string list * tyvar list * srcpos * ty -> wherespec


WhStruct

constructor WhStruct : string list * string list -> wherespec


VarSig

constructor VarSig : string -> sigexp


AugSig

constructor AugSig : sigexp * wherespec list -> sigexp


BaseSig

constructor BaseSig : srcpos * (spec * srcposlist -> sigexp


MarkSig

constructor MarkSig : sigexp * region -> sigexp


VarFsig

constructor VarFsig : string -> fsigexp


BaseFsig

constructor BaseFsig
            : {params : (string option * sigexplist, result : sigexp} ->
                fsigexp


MarkFsig

constructor MarkFsig : fsigexp * region -> fsigexp


StrSpec

constructor StrSpec
            : (((string * sigexp * path option) * region) * srcposlist -> spec


TycSpec

constructor TycSpec
            : (((string * tyvar list * srcpos * ty option) * region) * srcposlist *
              bool ->
                spec


FctSpec

constructor FctSpec : (((string * fsigexp) * region) * srcposlist -> spec


ValSpec

constructor ValSpec : (((string * srcpos * ty) * region) * srcposlist -> spec


DataSpec

constructor DataSpec
            : {
                datatycs : (db * srcposlist,
                withtycsBeginPos : srcpos,
                withtycs : (tb * srcposlist
              } ->
                spec


ExceSpec

constructor ExceSpec
            : (((string * srcpos * ty option) * region) * srcposlist -> spec


ShareStrSpec

constructor ShareStrSpec : path list -> spec


ShareTycSpec

constructor ShareTycSpec : path list -> spec


IncludeSpec

constructor IncludeSpec : sigexp -> spec


ValDec

constructor ValDec : (vb * srcposlist * tyvar list -> dec


ValrecDec

constructor ValrecDec : (rvb * srcposlist * tyvar list -> dec


FunDec

constructor FunDec : (fb * srcposlist * tyvar list -> dec


TypeDec

constructor TypeDec : (tb * srcposlist -> dec


DatatypeDec

constructor DatatypeDec
            : {
                datatycs : (db * srcposlist,
                withtycsBeginPos : srcpos,
                withtycs : (tb * srcposlist
              } ->
                dec


AbstypeDec

constructor AbstypeDec
            : {
                abstycs : (db * srcposlist,
                withtycsBeginPos : srcpos,
                withtycs : (tb * srcposlist,
                bodyBeginPos : srcpos,
                body : dec
              } ->
                dec


ExceptionDec

constructor ExceptionDec : (eb * srcposlist -> dec


StrDec

constructor StrDec : (strb * srcposlist -> dec


AbsDec

constructor AbsDec : (strb * srcposlist -> dec


FctDec

constructor FctDec : (fctb * srcposlist -> dec


SigDec

constructor SigDec : (sigb * srcposlist -> dec


FsigDec

constructor FsigDec : (fsigb * srcposlist -> dec


LocalDec

constructor LocalDec : srcpos * dec * srcpos * dec -> dec


SeqDec

constructor SeqDec : (dec * srcposlist -> dec


OpenDec

constructor OpenDec : path list -> dec


OvldDec

constructor OvldDec : string * ty * exp list -> dec


FixDec

constructor FixDec : {fixity : fixity, ops : string list} -> dec


UseDec

constructor UseDec : string -> dec


MarkDec

constructor MarkDec : dec * region -> dec


Vb

constructor Vb : {pat : pat, exp : exp, lazyp : bool} * region -> vb


Rvb

constructor Rvb
            : {var : string, exp : exp, resultty : ty option, lazyp : bool} *
              region ->
                rvb


Fb

constructor Fb : clause list * bool -> fb


MarkFb

constructor MarkFb : fb * region -> fb


Clause

constructor Clause
            : {pats : pat list, resultty : ty option, exp : exp} * region ->
                clause


Tb

constructor Tb
            : {
                tyc : string,
                defBeginPos : srcpos,
                def : ty,
                tyvars : tyvar list
              } *
              region ->
                tb


Db

constructor Db
            : {
                tyc : string,
                tyvars : tyvar list,
                rhsBeginPos : srcpos,
                rhs : dbrhs,
                lazyp : bool
              } *
              region ->
                db


Constrs

constructor Constrs
            : (((string * srcpos * ty option) * region) * srcposlist -> dbrhs


Repl

constructor Repl : string list -> dbrhs


EbGen

constructor EbGen
            : {exn : string, etypeBeginPos : srcpos, etype : ty option} * region
              ->
                eb


EbDef

constructor EbDef : {exn : string, edef : path} * region -> eb


Strb

constructor Strb
            : {name : string, def : strexp, constraint : sigexp sigConst} *
              region ->
                strb


Fctb

constructor Fctb : {name : string, def : fctexp} * region -> fctb


Sigb

constructor Sigb : {name : string, def : sigexp} * region -> sigb


Fsigb

constructor Fsigb : {name : string, def : fsigexp} * region -> fsigb


VarTy

constructor VarTy : tyvar -> ty


ConTy

constructor ConTy : string list * srcpos * (ty * srcposlist -> ty


RecordTy

constructor RecordTy : srcpos * (tyrow * srcposlist -> ty


TupleTy

constructor TupleTy : (ty * srcposlist -> ty


EnclosedTy

constructor EnclosedTy : srcpos * ty -> ty


MarkTy

constructor MarkTy : ty * region -> ty


TyRow

constructor TyRow : (string * srcpos * ty) * region -> tyrow

   


Overview  Index  Help 
SMLDoc: Documentation generator for SML