CVS: sml-dist/src/compiler/FLINT/kernel pplty.sml, NONE, 1.1.2.1 ltybasic.sml, 1.13.24.1, 1.13.24.2 ltykernel.sml, 1.18.12.3, 1.18.12.4
George Kuan <[email protected]> Fri, 28 Jul 2006 15:26:11 -0700
| Newsgroups | gmane.comp.lang.sml.smlnj.commits |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/smlnj/sml-dist/src/compiler/FLINT/kernel
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32569/FLINT/kernel
Modified Files:
Tag: primop-branch-2
ltybasic.sml ltykernel.sml
Added Files:
Tag: primop-branch-2
pplty.sml
Log Message:
started LTy pretty printer using SMLNJ-lib
--- NEW FILE: pplty.sml ---
(* pplty.sml
* Pretty Printer for PLambda types using the new SMLNJ-lib new pretty printer
*
*)
structure PPLTy =
struct
(* ppTKind : tkind -> unit
* Print a hashconsed representation of the kind *)
fun ppTKind (tk : TK.tkind) =
let fun ppTKindI(LK.TK_MONO) = "TK_MONO"
| ppTKindI(LK.TK_BOX) = "TK_BOX"
| ppTKindI(LK.TK_FUN (arg_tkinds, res_tkind)) =
(openHOVBox 1;
pps "TK_FUN (";
(ppSequence ppstrm
{sep = fn ppstrm => (PP.break ppstrm {nsp=1, offset=0};
PP.string ppstrm "* "),
style = INCONSISTENT,
pr = (fn _ => fn tk =>
(openHOVBox 1;
pps "(";
(* Print Kind *)
pps ")";
closeBox()))}
arg_tkinds);
ppTKind res_tkind;
pps ")")
| ppTKindI(LK.TK_SEQ tkinds) =
(openHOVBox 1;
pps "TK_SEQ ";
(ppSequence ppstrm
{sep = fn ppstrm => (PP.break ppstrm {nsp=1, offset=0};
PP.string ppstrm ", "),
style = INCONSISTENT,
pr = (fn _ => fn tk =>
(openHOVBox 1;
pps "(";
(* Print Kind *)
pps ")";
closeBox()))}
tkinds))
in ppTKindI (LK.tk_out tk)
end
fun ppTyc (tycon : tyc) =
let fun ppTycI (LK.TC_VAR())
end
Index: ltybasic.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/kernel/ltybasic.sml,v
retrieving revision 1.13.24.1
retrieving revision 1.13.24.2
diff -C2 -d -r1.13.24.1 -r1.13.24.2
*** ltybasic.sml 26 Jul 2006 18:20:36 -0000 1.13.24.1
--- ltybasic.sml 28 Jul 2006 22:26:07 -0000 1.13.24.2
***************
*** 176,182 ****
| _ => tcc_app(tc, ts) *)
val _ = 1
! in ("DT{" ^ "DATA" (* ^ "[" ^ (tc_print tc)
^ "] &&" ^ (plist(tc_print, ts))
! ^ "&&" *) ^ "===" ^ (itos i) ^ "}")
end)
| g (LK.TC_ABS t) = "Ax(" ^ (tc_print t) ^ ")"
--- 176,182 ----
| _ => tcc_app(tc, ts) *)
val _ = 1
! in ("DT{" ^ "DATA" ^ (* "[" ^ (tc_print tc)
^ "] &&" ^ (plist(tc_print, ts))
! ^ "&&" ^*) "===" ^ (itos i) ^ "}")
end)
| g (LK.TC_ABS t) = "Ax(" ^ (tc_print t) ^ ")"
Index: ltykernel.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/kernel/ltykernel.sml,v
retrieving revision 1.18.12.3
retrieving revision 1.18.12.4
diff -C2 -d -r1.18.12.3 -r1.18.12.4
*** ltykernel.sml 26 Jul 2006 19:53:25 -0000 1.18.12.3
--- ltykernel.sml 28 Jul 2006 22:26:07 -0000 1.18.12.4
***************
*** 489,495 ****
| _ => tcc_app(tc, ts) *)
val _ = 1
! in ("DT{" ^ "DATA" (* ^ "[" ^ (tc_print tc)
^ "] &&" ^ (plist(tc_print, ts))
! ^ "&&" *) ^ "===" ^ (itos i) ^ "}")
end)
| TC_ABS t => "Ax(" ^ (tc_print t) ^ ")"
--- 489,495 ----
| _ => tcc_app(tc, ts) *)
val _ = 1
! in ("DT{" ^ "DATA" ^ "[" ^ (tc_print tc)
^ "] &&" ^ (plist(tc_print, ts))
! ^ "&&" ^ "===" ^ (itos i) ^ "}")
end)
| TC_ABS t => "Ax(" ^ (tc_print t) ^ ")"
-------------------------------------------------------------------------
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