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-3/compiler/FLINT/kernel/ltydict.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-3/compiler/FLINT/kernel/ltydict.sml

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

revision 2397, Wed Apr 11 14:46:59 2007 UTC revision 2398, Wed Apr 11 18:54:53 2007 UTC
# Line 1  Line 1 
1  (* Copyright (c) 1997 YALE FLINT PROJECT *)  (* Copyright (c) 1997 YALE FLINT PROJECT *)
2  (* ltydict.sml *)  (* ltydict.sml *)
3    
4  signature LTYDICT = sig  signature LTYDICT =
5    type tyc = LtyKernel.tyc  sig
6    type lty = LtyKernel.lty    type tyc = Lty.tyc
7      type lty = Lty.lty
8    
9    val tmemo_gen : {tcf: (tyc -> 'a) -> (tyc -> 'a),    val tmemo_gen : {tcf: (tyc -> 'a) -> (tyc -> 'a),
10                     ltf: ((tyc -> 'a) * (lty -> 'b)) -> (lty -> 'b)}                     ltf: ((tyc -> 'a) * (lty -> 'b)) -> (lty -> 'b)}
11                    -> {tc_map: tyc -> 'a, lt_map: lty -> 'b}                    -> {tc_map: tyc -> 'a, lt_map: lty -> 'b}
# Line 21  Line 23 
23  structure LtyDict : LTYDICT =  structure LtyDict : LTYDICT =
24  struct  struct
25    
26  local  type tyc = Lty.tyc
27        open LtyKernel  type lty = Lty.lty
 in  
   
 fun bug s = ErrorMsg.impossible ("LtyDict: " ^ s)  
 val say = Control.Print.say  
28    
29  structure TcDict = RedBlackMapFn(struct type ord_key = tyc  structure TcDict = RedBlackMapFn(struct
30                                       type ord_key = tyc
31                                        val compare = Lty.tc_cmp                                        val compare = Lty.tc_cmp
32                                 end)                                 end)
33    
34  structure LtDict = RedBlackMapFn(struct type ord_key = lty  structure LtDict = RedBlackMapFn(struct
35                                       type ord_key = lty
36                                        val compare = Lty.lt_cmp                                        val compare = Lty.lt_cmp
37                                 end)                                 end)
38    
 type tyc = tyc  
 type lty = lty  
   
39  fun tmemo_gen {tcf, ltf} =  fun tmemo_gen {tcf, ltf} =
40    let val m1 = ref (TcDict.empty)    let val m1 = ref (TcDict.empty)
41        val m2 = ref (LtDict.empty)        val m2 = ref (LtDict.empty)
# Line 99  Line 96 
96     in {tc_wmap=tcw_look, tc_umap=tcu_look, lt_umap=ltu_look, cleanup=cleanup}     in {tc_wmap=tcw_look, tc_umap=tcu_look, lt_umap=ltu_look, cleanup=cleanup}
97    end (* wmemo_gen *)    end (* wmemo_gen *)
98    
 end (* toplevel local *)  
99  end (* structure LtyDict *)  end (* structure LtyDict *)
   
   
   
   
   

Legend:
Removed from v.2397  
changed lines
  Added in v.2398

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