Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /archive/mlprof.1/absyn/bareabsyn.sml
ViewVC logotype

View of /archive/mlprof.1/absyn/bareabsyn.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 4054 - (download) (annotate)
Wed Feb 4 20:42:42 2015 UTC (4 years, 5 months ago) by dbm
File size: 2505 byte(s)
Initial import of archive (of early versions of sml/nj)
(* bareabsyn.sml *)

(* Abstract syntax of bare ML *)

structure BareAbsyn : BAREABSYN = struct

structure Basics = Basics
structure Access = Access

open Basics Access

datatype numberedLabel = LABEL of {name : Symbol.symbol, number: int};

datatype exp	= VARexp of var ref
		| CONexp of datacon
		| INTexp of int
		| REALexp of string
		| STRINGexp of string
		| RECORDexp of (numberedLabel * exp) list
		| SEQexp of exp list		
		| APPexp of exp * exp		
		| CONSTRAINTexp of exp * ty
		| HANDLEexp of exp * handler
		| RAISEexp of exp
		| LETexp of dec * exp
		| CASEexp of exp * rule list
		| FNexp of rule list

and rule	= RULE of pat * exp

and handler	= HANDLER of exp

and pat		= WILDpat
		| VARpat of var
		| INTpat of int
		| REALpat of string
		| STRINGpat of string
		| CONpat of datacon
		| RECORDpat of
		    {fields : (label * pat) list,
		     flex : bool,
		     typ : ty ref,
		     pats : pat list ref}
		| APPpat of datacon * pat
		| CONSTRAINTpat of pat * ty
		| LAYEREDpat of pat * pat

and strexp	= VARstr of structureVar
		| STRUCTstr of
		    {body: dec list,
		     locations: trans list}  (* component paths *)
		| APPstr of
		    {oper: functorVar,
		     argexp: strexp,
		     argthin: thinning}

and dec		= VALdec of vb list
		| VALRECdec of rvb list
		| TYPEdec of tycon list
		| DATATYPEdec of
		    {datatycs: tycon list,
		     withtycs: tycon list}
		| ABSTYPEdec of
		    {abstycs: tycon list,
		     withtycs: tycon list,
		     body: dec}
		| EXCEPTIONdec of eb list
		| STRdec of strb list
		| ABSdec of strb list
		| FCTdec of fctb list
		| SIGdec of signatureVar list
		| LOCALdec of dec * dec
		| SEQdec of dec list
		| OPENdec of structureVar list

and vb		= VB of
		     tyvars: tyvar list}

and rvb		= RVB of
		     resultty: ty option,
		     tyvars: tyvar list}

and fb		= FB of
		     clauses: clause list,
		     tyvars: tyvar list}

and clause	= CLAUSE of
		    {pats: pat list,
		     resultty: ty option,

and eb	 	= EB of
		     ty: ty option,
		     def:datacon option}

and strb	= STRB of 
		    {strvar: structureVar,
		     def: strexp,
		     thin: thinning,
		     constraint: Structure option}  (* information only *)

and fctb	= FCTB of
		    {fctvar: functorVar,
		     param: structureVar,
		     def: strexp,
		     thin: thinning,
		     constraint: Structure option}  (* information only *)

end (* structure BareAbsyn *)

ViewVC Help
Powered by ViewVC 1.0.0