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/trans/transtypes.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/trans/transtypes.sml

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

revision 1999, Mon Jul 31 16:05:41 2006 UTC revision 2000, Mon Jul 31 18:07:17 2006 UTC
# Line 36  Line 36 
36    
37  fun bug msg = ErrorMsg.impossible ("TransTypes: " ^ msg)  fun bug msg = ErrorMsg.impossible ("TransTypes: " ^ msg)
38  val say = Control.Print.say  val say = Control.Print.say
39  val debugging = Control.CG.tmdebugging  val debugging = ref true (* Control.CG.tmdebugging *)
40  fun debugmsg (msg: string) =  fun debugmsg (msg: string) =
41    if !debugging then (say msg; say "\n") else ()    if !debugging then (say msg; say "\n") else ()
42  val debugPrint = (fn x => debugPrint debugging x)  val debugPrint = (fn x => debugPrint debugging x)
# Line 62  Line 62 
62    handle _ => say "fail to print anything")    handle _ => say "fail to print anything")
63  end  end
64    
65    local
66        structure PPN = PrettyPrintNew
67    in
68    fun ppLtyc ltyc =
69        PPN.with_default_pp (fn ppstrm => PPLTy.ppTyc ppstrm ltyc)
70    end
71    
72  (****************************************************************************  (****************************************************************************
73   *               TRANSLATING ML TYPES INTO FLINT TYPES                      *   *               TRANSLATING ML TYPES INTO FLINT TYPES                      *
74   ****************************************************************************)   ****************************************************************************)
# Line 291  Line 298 
298          | g (POLYty _) = bug "unexpected poly-type in toTyc"          | g (POLYty _) = bug "unexpected poly-type in toTyc"
299          | g (UNDEFty) = bug "unexpected undef-type in toTyc"          | g (UNDEFty) = bug "unexpected undef-type in toTyc"
300          | g (WILDCARDty) = bug "unexpected wildcard-type in toTyc"          | g (WILDCARDty) = bug "unexpected wildcard-type in toTyc"
301          val plamty = (g t)
302     in (g t)        val _ = debugmsg "<<toTyc"
303          val _ = if !debugging then ppLtyc plamty else ()
304       in plamty
305    end    end
306    
307  and toLty d (POLYty {tyfun=TYFUN{arity=0, body}, ...}) = toLty d body  and toLty d (POLYty {tyfun=TYFUN{arity=0, body}, ...}) = toLty d body

Legend:
Removed from v.1999  
changed lines
  Added in v.2000

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