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

SCM Repository

[smlnj] Annotation of /sml/trunk/compiler/ElabData/syntax/absyn.sig
ViewVC logotype

Annotation of /sml/trunk/compiler/ElabData/syntax/absyn.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3648 - (view) (download) (as text)

1 : blume 902 (* absyn.sig
2 :     *
3 :     * (C) 2001 Lucent Technologies, Bell Labs
4 :     *)
5 :     signature ABSYN =
6 :     sig
7 :    
8 :     type region
9 :    
10 :     datatype numberedLabel = LABEL of {name: Symbol.symbol, number: int}
11 :    
12 :     datatype exp
13 : dbm 2492 = VARexp of VarCon.var ref * Types.tyvar list (* instance type *)
14 :     | CONexp of VarCon.datacon * Types.tyvar list (* instance type *)
15 : blume 902 | INTexp of IntInf.int * Types.ty
16 :     | WORDexp of IntInf.int * Types.ty
17 :     | REALexp of string
18 :     | STRINGexp of string
19 :     | CHARexp of string
20 :     | RECORDexp of (numberedLabel * exp) list
21 :     | SELECTexp of numberedLabel * exp
22 :     | VECTORexp of exp list * Types.ty
23 :     | PACKexp of exp * Types.ty * Types.tycon list
24 :     | APPexp of exp * exp
25 : mblume 1641 | HANDLEexp of exp * fnrules
26 : blume 902 | RAISEexp of exp * Types.ty
27 :     | CASEexp of exp * rule list * bool
28 : mblume 1332 | IFexp of { test: exp, thenCase: exp, elseCase: exp }
29 :     | ANDALSOexp of exp * exp
30 :     | ORELSEexp of exp * exp
31 :     | WHILEexp of { test: exp, expr: exp }
32 : mblume 1641 | FNexp of fnrules
33 : blume 902 | LETexp of dec * exp
34 :     | SEQexp of exp list
35 :     | CONSTRAINTexp of exp * Types.ty
36 :     | MARKexp of exp * region
37 :    
38 :     and rule = RULE of pat * exp
39 :    
40 :     and pat
41 :     = WILDpat
42 :     | VARpat of VarCon.var
43 :     | INTpat of IntInf.int * Types.ty
44 :     | WORDpat of IntInf.int * Types.ty
45 :     | REALpat of string
46 :     | STRINGpat of string
47 :     | CHARpat of string
48 : dbm 2492 | CONpat of VarCon.datacon * Types.tyvar list (* instance type *)
49 : blume 902 | RECORDpat of {fields : (Types.label * pat) list,
50 :     flex : bool, typ : Types.ty ref}
51 : dbm 2492 | APPpat of VarCon.datacon * Types.tyvar list * pat
52 : blume 902 | CONSTRAINTpat of pat * Types.ty
53 :     | LAYEREDpat of pat * pat
54 :     | ORpat of pat * pat
55 :     | VECTORpat of pat list * Types.ty
56 : dbm 3648 | MARKpat of pat * region
57 : blume 902 | NOpat
58 :    
59 :     and dec
60 :     = VALdec of vb list
61 :     | VALRECdec of rvb list
62 :     | TYPEdec of Types.tycon list
63 :     | DATATYPEdec of {datatycs: Types.tycon list, withtycs: Types.tycon list}
64 :     | ABSTYPEdec of {abstycs: Types.tycon list,
65 :     withtycs: Types.tycon list, body: dec}
66 :     | EXCEPTIONdec of eb list
67 :     | STRdec of strb list
68 :     | ABSdec of strb list
69 :     | FCTdec of fctb list
70 :     | SIGdec of Modules.Signature list
71 :     | FSIGdec of Modules.fctSig list
72 :     | OPENdec of (SymPath.path * Modules.Structure) list
73 :     | LOCALdec of dec * dec
74 :     | SEQdec of dec list
75 :     | OVLDdec of VarCon.var
76 :     | FIXdec of {fixity: Fixity.fixity, ops: Symbol.symbol list}
77 :     | MARKdec of dec * region
78 :    
79 :     and strexp
80 :     = VARstr of Modules.Structure
81 :     | STRstr of Bindings.binding list
82 :     | APPstr of {oper: Modules.Functor, arg: Modules.Structure,
83 :     argtycs: Types.tycpath list}
84 :     | LETstr of dec * strexp
85 :     | MARKstr of strexp * region
86 :    
87 :     and fctexp
88 :     = VARfct of Modules.Functor
89 :     | FCTfct of {param: Modules.Structure, argtycs: Types.tycpath list,
90 :     def: strexp}
91 :     | LETfct of dec * fctexp
92 :     | MARKfct of fctexp * region
93 :    
94 :     and vb = VB of {pat: pat, exp: exp, boundtvs: Types.tyvar list,
95 :     tyvars: Types.tyvar list ref}
96 :    
97 :     and rvb = RVB of {var: VarCon.var, exp: exp, boundtvs: Types.tyvar list,
98 :     resultty: Types.ty option, tyvars: Types.tyvar list ref}
99 :    
100 :     and eb = EBgen of {exn: VarCon.datacon, etype: Types.ty option, ident: exp}
101 :     | EBdef of {exn: VarCon.datacon, edef: VarCon.datacon}
102 :    
103 :     and strb = STRB of {name: Symbol.symbol, str: Modules.Structure, def: strexp}
104 :     and fctb = FCTB of {name: Symbol.symbol, fct: Modules.Functor, def: fctexp}
105 :    
106 : mblume 1641 withtype fnrules = rule list * Types.ty
107 :    
108 : blume 902 end (* signature ABSYN *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0