CVS: sml-dist/src/compiler/FLINT/trans transtypes.sml, 1.5.10.1, 1.5.10.2

George Kuan <[email protected]> Mon, 31 Jul 2006 11:07:20 -0700
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/src/compiler/FLINT/trans
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20724/src/compiler/FLINT/trans

Modified Files:
      Tag: primop-branch-2
	transtypes.sml 
Log Message:
PPLty complete at least for printing Ltycs

Index: transtypes.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/trans/transtypes.sml,v
retrieving revision 1.5.10.1
retrieving revision 1.5.10.2
diff -C2 -d -r1.5.10.1 -r1.5.10.2
*** transtypes.sml	10 Jul 2006 22:27:13 -0000	1.5.10.1
--- transtypes.sml	31 Jul 2006 18:07:17 -0000	1.5.10.2
***************
*** 37,41 ****
  fun bug msg = ErrorMsg.impossible ("TransTypes: " ^ msg)
  val say = Control.Print.say 
! val debugging = Control.CG.tmdebugging
  fun debugmsg (msg: string) =
    if !debugging then (say msg; say "\n") else ()
--- 37,41 ----
  fun bug msg = ErrorMsg.impossible ("TransTypes: " ^ msg)
  val say = Control.Print.say 
! val debugging = ref true (* Control.CG.tmdebugging *)
  fun debugmsg (msg: string) =
    if !debugging then (say msg; say "\n") else ()
***************
*** 63,66 ****
--- 63,73 ----
  end
  
+ local 
+     structure PPN = PrettyPrintNew
+ in
+ fun ppLtyc ltyc = 
+     PPN.with_default_pp (fn ppstrm => PPLTy.ppTyc ppstrm ltyc)
+ end
+ 
  (****************************************************************************
   *               TRANSLATING ML TYPES INTO FLINT TYPES                      *
***************
*** 292,297 ****
          | g (UNDEFty) = bug "unexpected undef-type in toTyc"
          | g (WILDCARDty) = bug "unexpected wildcard-type in toTyc"
! 
!    in (g t) 
    end
  
--- 299,306 ----
          | g (UNDEFty) = bug "unexpected undef-type in toTyc"
          | g (WILDCARDty) = bug "unexpected wildcard-type in toTyc"
!       val plamty = (g t)
!       val _ = debugmsg "<<toTyc"
!       val _ = if !debugging then ppLtyc plamty else ()
!    in plamty
    end
  


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV