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

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/FLINT/kernel/ltykernel.sig
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/kernel/ltykernel.sig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24, Thu Mar 12 00:49:58 1998 UTC revision 45, Sun Mar 22 20:11:09 1998 UTC
# Line 10  Line 10 
10    = TK_MONO                                   (* ground mono tycon *)    = TK_MONO                                   (* ground mono tycon *)
11    | TK_BOX                                    (* boxed/tagged tycon *)    | TK_BOX                                    (* boxed/tagged tycon *)
12    | TK_SEQ of tkind list                      (* sequence of tycons *)    | TK_SEQ of tkind list                      (* sequence of tycons *)
13    | TK_FUN of tkind * tkind                   (* tycon function *)    | TK_FUN of tkind list * tkind              (* tycon function *)
14    
15  (* definitions of named tyc variables *)  (* definitions of named tyc variables *)
16  type tvar = LambdaVar.lvar                    (* temporary, not used *)  type tvar = LambdaVar.lvar                    (* temporary, not used *)
# Line 19  Line 19 
19  (* definitions of tyc and tyc-environment *)  (* definitions of tyc and tyc-environment *)
20  type tyc  type tyc
21  type tycEnv  type tycEnv
22    type token                                    (* a hook to add new tyc *)
23    
24    datatype fflag                                (* calling conventions *)
25      = FF_VAR of bool * bool                     (* is it fixed ? *)
26      | FF_FIXED                                  (* used after rep. analysis *)
27    
28    datatype rflag = RF_TMP                       (* tuple kind: a template *)
29    
30  datatype tycI  datatype tycI
31    = TC_VAR of DebIndex.index * int            (* tyc variable *)    = TC_VAR of DebIndex.index * int            (* tyc variable *)
# Line 32  Line 39 
39    | TC_SUM of tyc list                        (* sum tyc *)    | TC_SUM of tyc list                        (* sum tyc *)
40    | TC_FIX of (int * tyc * tyc list) * int    (* recursive tyc *)    | TC_FIX of (int * tyc * tyc list) * int    (* recursive tyc *)
41    
42    | TC_TUPLE of tyc list                      (* std record tyc *)    | TC_TUPLE of rflag * tyc list              (* std record tyc *)
43    | TC_ARROW of rawflag * tyc list * tyc list (* std function tyc *)    | TC_ARROW of fflag * tyc list * tyc list   (* std function tyc *)
44    | TC_PARROW of tyc * tyc                    (* special fun tyc, not used *)    | TC_PARROW of tyc * tyc                    (* special fun tyc, not used *)
45    
46    | TC_BOX of tyc                             (* boxed tyc *)    | TC_BOX of tyc                             (* boxed tyc *)
47    | TC_ABS of tyc                             (* abstract tyc *)    | TC_ABS of tyc                             (* abstract tyc *)
48      | TC_TOKEN of token * tyc                   (* extensible token tyc *)
49    | TC_CONT of tyc list                       (* std continuation tyc *)    | TC_CONT of tyc list                       (* std continuation tyc *)
50    | TC_IND of tyc * tycI                      (* indirect tyc thunk *)    | TC_IND of tyc * tycI                      (* indirect tyc thunk *)
51    | TC_ENV of tyc * int * int * tycEnv        (* tyc closure *)    | TC_ENV of tyc * int * int * tycEnv        (* tyc closure *)
52    
 withtype rawflag = bool * bool    (* single or multiple arguments/results ? *)  
   
53  (* definition of lty *)  (* definition of lty *)
54  type lty  type lty
55  datatype ltyI  datatype ltyI
# Line 74  Line 80 
80  (** get the hash key of each lty, used by reps/coerce.sml; a hack! *)  (** get the hash key of each lty, used by reps/coerce.sml; a hack! *)
81  val lt_key   : lty -> int  val lt_key   : lty -> int
82    
83  (** testing the equivalence for regular tkinds, tycs and ltys *)  (** testing equivalence of tkinds, tycs, ltys, fflags, and rflags *)
84  val tk_eqv   : tkind * tkind -> bool  val tk_eqv   : tkind * tkind -> bool
85  val tc_eqv   : tyc * tyc -> bool  val tc_eqv   : tyc * tyc -> bool
86  val lt_eqv   : lty * lty -> bool  val lt_eqv   : lty * lty -> bool
87    val ff_eqv   : fflag * fflag -> bool
88    val rf_eqv   : rflag * rflag -> bool
89    
90  (** testing the equivalence for tycs and ltys with relaxed constraints *)  (** testing the equivalence for tycs and ltys with relaxed constraints *)
91    val tc_eqv_x : tyc * tyc -> bool
92    val lt_eqv_x : lty * lty -> bool
93  val tc_eqv_bx: tyc * tyc -> bool  val tc_eqv_bx: tyc * tyc -> bool
94  val lt_eqv_bx: lty * lty -> bool  val lt_eqv_bx: lty * lty -> bool
95    
# Line 111  Line 121 
121  (** automatically flattening the argument or the result type *)  (** automatically flattening the argument or the result type *)
122  val lt_autoflat : lty -> bool * lty list * bool  val lt_autoflat : lty -> bool * lty list * bool
123    
124  (** tcc_arw does automatic argument and result flattening *)  (** testing if a tyc is a unknown constructor *)
125  val tcc_arw : rawflag * tyc list * tyc list -> tyc  val tc_unknown : tyc -> bool
126    
127    (** automatically tupling up the multiple argument/result into a single one *)
128    val tc_autotuple : tyc list -> tyc
129    
130    (** tcc_arw does automatic argument and result flattening, so go away *)
131    val tcc_arw : fflag * tyc list * tyc list -> tyc
132    
133    (** token-related functions *)
134    val token_name    : token -> string
135    val token_abbrev  : token -> string            (* used by tc_print *)
136    val token_isvalid : token -> bool
137    val token_eq      : token * token -> bool
138    val token_int     : token -> int               (* for pickling *)
139    val token_key     : int -> token
140    
141    (** primitive TC_WRAP constructor, built through the token facility *)
142    val wrap_token    : token
143    
144  end (* signature LTYKERNEL *)  end (* signature LTYKERNEL *)
145    

Legend:
Removed from v.24  
changed lines
  Added in v.45

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