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/gatien-branch/compiler/Elaborator/srcinfo/ens_print2.sml
ViewVC logotype

Diff of /sml/branches/gatien-branch/compiler/Elaborator/srcinfo/ens_print2.sml

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

revision 3144, Fri Jul 25 15:55:07 2008 UTC revision 3152, Fri Jul 25 20:28:25 2008 UTC
# Line 1  Line 1 
1  signature ENS_PRINT2 =  structure DBPrint : DBPRINT =
 sig  
    val maj : StaticEnv.staticEnv -> unit  
   
    val rtoS : Ens_types2.location -> string  
    val stoS : Symbol.symbol -> string  
    val ptoS : Symbol.symbol list -> string  
    val rptoS : InvPath.path -> string  
   
    val print_ty' : Ens_types2.ty' -> unit  
    val print_tycon' : Ens_types2.tycon' -> unit  
    val printer : Types.ty -> unit  
   
    val print_key : Ens_types2.key -> string  
   
    val print_var : Ens_types2.var_elem -> unit  
    val print_type : Ens_types2.type_elem -> unit  
    val print_cons : Ens_types2.cons_elem -> unit  
    val print_str : Ens_types2.str_elem -> unit  
    val print_sig : Ens_types2.sig_elem -> unit  
    val print_ext : Ens_types2.ext_elem -> unit  
   
 end (* signature ENS_PRINT*)  
   
 structure Ens_print2 : ENS_PRINT2 =  
2  struct  struct
3    
4  local  local
# Line 32  Line 8 
8      structure PP = PrettyPrintNew      structure PP = PrettyPrintNew
9      structure VC = VarCon      structure VC = VarCon
10      structure M = Modules      structure M = Modules
11      open Ens_types2      open DBTypes
12  in  in
13    
14     fun bug msg = ErrorMsg.impossible("Bugs in Ens_print2: "^msg);     fun bug msg = ErrorMsg.impossible("DBPrint: "^msg);
15    
16     val stat_env = ref (StaticEnv.empty);     val stat_env = ref (StaticEnv.empty);
17     fun maj e = stat_env := e;     fun maj e = stat_env := e;
# Line 113  Line 89 
89             Conty (Record [], []) => print "unit"             Conty (Record [], []) => print "unit"
90           | Conty (Record (ll as h::_), tyl) =>           | Conty (Record (ll as h::_), tyl) =>
91             if stoS h = "1" then             if stoS h = "1" then
92                 let fun p [] = ErrorMsg.impossible "Ens_var2: print_ty'.1"                 let fun p [] = bug "print_ty'.1"
93                       | p [x] = print_ty' x                       | p [x] = print_ty' x
94                       | p (x::y) = (print_ty' x; print " * "; p y)                       | p (x::y) = (print_ty' x; print " * "; p y)
95                 in                 in
# Line 142  Line 118 
118               print_ty' t2               print_ty' t2
119             )             )
120           | Conty _ =>           | Conty _ =>
121             ErrorMsg.impossible "Ens_var2: print_ty'.2"             bug "print_ty'.2"
122           | Ibound index =>           | Ibound index =>
123             print ("'" ^ str (Char.chr (Char.ord #"a" + index)))             print ("'" ^ str (Char.chr (Char.ord #"a" + index)))
124           | Lbound {depth, index} =>           | Lbound {depth, index} =>
# Line 343  Line 319 
319    
320    
321  end  end
322  end (* structure Ens_print *)  end (* structure DBPrint *)

Legend:
Removed from v.3144  
changed lines
  Added in v.3152

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