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/branches/primop-branch-2/src/compiler/FLINT/kernel/ltydef.sig
ViewVC logotype

Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/kernel/ltydef.sig

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

revision 16, Wed Mar 11 21:00:04 1998 UTC revision 114, Fri Jun 5 19:41:21 1998 UTC
# Line 21  Line 21 
21  type fflag = LtyKernel.fflag  type fflag = LtyKernel.fflag
22  type rflag = LtyKernel.rflag  type rflag = LtyKernel.rflag
23    
 val default_fflag : fflag  
 val default_rflag : rflag  
   
24  type tkind = LtyKernel.tkind  type tkind = LtyKernel.tkind
25  type tyc = LtyKernel.tyc  type tyc = LtyKernel.tyc
26  type lty = LtyKernel.lty  type lty = LtyKernel.lty
# Line 68  Line 65 
65    
66    
67  (*  (*
68     * FLINT fflag and rflag are used to classify different kinds of monomorphic
69     * functions and records. As of now, they are roughly equivalent to:
70     *
71     *    datatype fflag
72     *      = FF_VAR of bool * bool
73     *      | FF_FIXED
74     *
75     *    datatype rflag = RF_TMP
76     *
77     * We treat both as abstract types so pattern matching no longer applies.
78     * NOTE: FF_VAR flags are used by FLINTs before we perform representation
79     * analysis while FF_FIXED is used by FLINTs after we perform representation
80     * analysis.
81     *)
82    
83    (** fflag and rflag constructors *)
84    val ffc_var    : bool * bool -> fflag
85    val ffc_fixed  : fflag
86    val rfc_tmp    : rflag
87    
88    (** fflag and rflag deconstructors *)
89    val ffd_var    : fflag -> bool * bool
90    val ffd_fixed  : fflag -> unit
91    val rfd_tmp    : rflag -> unit
92    
93    (** fflag and rflag predicates *)
94    val ffp_var    : fflag -> bool
95    val ffp_fixed  : fflag -> bool
96    val rfp_tmp    : rflag -> bool
97    
98    (** fflag and rflag one-arm switch *)
99    val ffw_var    : fflag * (bool * bool -> 'a) * (fflag -> 'a) -> 'a
100    val ffw_fixed  : fflag * (unit -> 'a) * (fflag -> 'a) -> 'a
101    val rfw_tmp    : rflag * (unit -> 'a) * (rflag -> 'a) -> 'a
102    
103    
104    (*
105   * FLINT tyc is roughly equivalent to the following ML datatype   * FLINT tyc is roughly equivalent to the following ML datatype
106   *   *
107   *    datatype tyc   *    datatype tyc
108   *      = TC_VAR of index * int   *      = TC_VAR of index * int
109   *      | TC_NVAR of tvar * depth * int    (* currently not used *)   *      | TC_NVAR of tvar * depth * int    (* NOT USED *)
110   *      | TC_PRIM of primtyc   *      | TC_PRIM of primtyc
111   *      | TC_FN of tkind list * tyc   *      | TC_FN of tkind list * tyc
112   *      | TC_APP of tyc * tyc list   *      | TC_APP of tyc * tyc list
# Line 80  Line 114 
114   *      | TC_PROJ of tyc * int   *      | TC_PROJ of tyc * int
115   *      | TC_SUM of tyc list   *      | TC_SUM of tyc list
116   *      | TC_FIX of tyc * int   *      | TC_FIX of tyc * int
117   *      | TC_ABS of tyc                    (* currently not used *)   *      | TC_WRAP of tyc                   (* used after rep. analysis only *)
118   *      | TC_BOX of tyc                    (* used by rep analysis only *)   *      | TC_ABS of tyc                    (* NOT USED *)
119   *      | TC_TUPLE of tyc list   *      | TC_BOX of tyc                    (* NOT USED *)
120     *      | TC_TUPLE of tyc list             (* rflag hidden *)
121   *      | TC_ARROW of fflag * tyc list * tyc list   *      | TC_ARROW of fflag * tyc list * tyc list
122   *   *
123   * We treat tyc as an abstract type so we can no longer use   * We treat tyc as an abstract type so we can no longer use
# Line 103  Line 138 
138  val tcc_proj   : tyc * int -> tyc  val tcc_proj   : tyc * int -> tyc
139  val tcc_sum    : tyc list -> tyc  val tcc_sum    : tyc list -> tyc
140  val tcc_fix    : (int * tyc * tyc list) * int -> tyc  val tcc_fix    : (int * tyc * tyc list) * int -> tyc
141    val tcc_wrap   : tyc -> tyc
142  val tcc_abs    : tyc -> tyc  val tcc_abs    : tyc -> tyc
143  val tcc_box    : tyc -> tyc  val tcc_box    : tyc -> tyc
144  val tcc_tuple  : tyc list -> tyc  val tcc_tuple  : tyc list -> tyc
# Line 118  Line 154 
154  val tcd_proj   : tyc -> tyc * int  val tcd_proj   : tyc -> tyc * int
155  val tcd_sum    : tyc -> tyc list  val tcd_sum    : tyc -> tyc list
156  val tcd_fix    : tyc -> (int * tyc * tyc list) * int  val tcd_fix    : tyc -> (int * tyc * tyc list) * int
157    val tcd_wrap   : tyc -> tyc
158  val tcd_abs    : tyc -> tyc  val tcd_abs    : tyc -> tyc
159  val tcd_box    : tyc -> tyc  val tcd_box    : tyc -> tyc
160  val tcd_tuple  : tyc -> tyc list  val tcd_tuple  : tyc -> tyc list
# Line 133  Line 170 
170  val tcp_proj   : tyc -> bool  val tcp_proj   : tyc -> bool
171  val tcp_sum    : tyc -> bool  val tcp_sum    : tyc -> bool
172  val tcp_fix    : tyc -> bool  val tcp_fix    : tyc -> bool
173    val tcp_wrap   : tyc -> bool
174  val tcp_abs    : tyc -> bool  val tcp_abs    : tyc -> bool
175  val tcp_box    : tyc -> bool  val tcp_box    : tyc -> bool
176  val tcp_tuple  : tyc -> bool  val tcp_tuple  : tyc -> bool
# Line 148  Line 186 
186  val tcw_proj   : tyc * (tyc * int -> 'a) * (tyc -> 'a) -> 'a  val tcw_proj   : tyc * (tyc * int -> 'a) * (tyc -> 'a) -> 'a
187  val tcw_sum    : tyc * (tyc list -> 'a) * (tyc -> 'a) -> 'a  val tcw_sum    : tyc * (tyc list -> 'a) * (tyc -> 'a) -> 'a
188  val tcw_fix    : tyc * ((int * tyc * tyc list) * int -> 'a) * (tyc -> 'a) -> 'a  val tcw_fix    : tyc * ((int * tyc * tyc list) * int -> 'a) * (tyc -> 'a) -> 'a
189    val tcw_wrap   : tyc * (tyc -> 'a) * (tyc -> 'a) -> 'a
190  val tcw_abs    : tyc * (tyc -> 'a) * (tyc -> 'a) -> 'a  val tcw_abs    : tyc * (tyc -> 'a) * (tyc -> 'a) -> 'a
191  val tcw_box    : tyc * (tyc -> 'a) * (tyc -> 'a) -> 'a  val tcw_box    : tyc * (tyc -> 'a) * (tyc -> 'a) -> 'a
192  val tcw_tuple  : tyc * (tyc list -> 'a) * (tyc -> 'a) -> 'a  val tcw_tuple  : tyc * (tyc list -> 'a) * (tyc -> 'a) -> 'a
# Line 163  Line 202 
202   *      | LT_STR of lty list   *      | LT_STR of lty list
203   *      | LT_FCT of lty list * lty list   *      | LT_FCT of lty list * lty list
204   *      | LT_POLY of tkind list * lty list   *      | LT_POLY of tkind list * lty list
  *      | LT_PST of (int * lty) list         (* soon obsolete *)  
205   *   *
206   * We treat lty as an abstract type so we can no longer use pattern   * We treat lty as an abstract type so we can no longer use pattern
207   * matching. The client does not need to worry about whether an lty   * matching. The client does not need to worry about whether an lty
# Line 175  Line 213 
213  val ltc_str    : lty list -> lty  val ltc_str    : lty list -> lty
214  val ltc_fct    : lty list * lty list -> lty  val ltc_fct    : lty list * lty list -> lty
215  val ltc_poly   : tkind list * lty list -> lty  val ltc_poly   : tkind list * lty list -> lty
 val ltc_pst    : (int * lty) list -> lty  
216    
217  (** lty deconstructors *)  (** lty deconstructors *)
218  val ltd_tyc    : lty -> tyc  val ltd_tyc    : lty -> tyc
219  val ltd_str    : lty -> lty list  val ltd_str    : lty -> lty list
220  val ltd_fct    : lty -> lty list * lty list  val ltd_fct    : lty -> lty list * lty list
221  val ltd_poly   : lty -> tkind list * lty list  val ltd_poly   : lty -> tkind list * lty list
 val ltd_pst    : lty -> (int * lty) list  
222    
223  (** lty predicates *)  (** lty predicates *)
224  val ltp_tyc    : lty -> bool  val ltp_tyc    : lty -> bool
225  val ltp_str    : lty -> bool  val ltp_str    : lty -> bool
226  val ltp_fct    : lty -> bool  val ltp_fct    : lty -> bool
227  val ltp_poly   : lty -> bool  val ltp_poly   : lty -> bool
 val ltp_pst    : lty -> bool  
228    
229  (** lty one arm switches *)  (** lty one arm switches *)
230  val ltw_tyc    : lty * (tyc -> 'a) * (lty -> 'a) -> 'a  val ltw_tyc    : lty * (tyc -> 'a) * (lty -> 'a) -> 'a
231  val ltw_str    : lty * (lty list -> 'a) * (lty -> 'a) -> 'a  val ltw_str    : lty * (lty list -> 'a) * (lty -> 'a) -> 'a
232  val ltw_fct    : lty * (lty list * lty list -> 'a) * (lty -> 'a) -> 'a  val ltw_fct    : lty * (lty list * lty list -> 'a) * (lty -> 'a) -> 'a
233  val ltw_poly   : lty * (tkind list * lty list -> 'a) * (lty -> 'a) -> 'a  val ltw_poly   : lty * (tkind list * lty list -> 'a) * (lty -> 'a) -> 'a
 val ltw_pst    : lty * ((int * lty) list -> 'a) * (lty -> 'a) -> 'a  
234    
235    
236  (*  (*
# Line 233  Line 267 
267    
268  (*  (*
269   * The following functions are written for CPS only. If you are writing   * The following functions are written for CPS only. If you are writing
270   * writing code for FLINT, you should not use any of these functions.   * code for FLINT, you should not use any of these functions.
271   * The continuation referred here is the internal continuation introduced   * The continuation referred here is the internal continuation introduced
272   * via CPS conversion; it is different from the source-level continuation   * via CPS conversion; it is different from the source-level continuation
273   * ('a cont) or control continuation ('a control-cont) where are represented   * ('a cont) or control continuation ('a control-cont) where are represented
# Line 297  Line 331 
331  val ltw_pfct   : lty * (lty * lty -> 'a) * (lty -> 'a) -> 'a  val ltw_pfct   : lty * (lty * lty -> 'a) * (lty -> 'a) -> 'a
332    
333  end (* signature LTYDEF *)  end (* signature LTYDEF *)
334    
335    (*
336     * $Log$
337     *)

Legend:
Removed from v.16  
changed lines
  Added in v.114

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