CVS: sml-dist/src/compiler/FLINT/kernel ltykernel.sig, 1.11.24.3, 1.11.24.4 ltykernel.sml, 1.18.12.7, 1.18.12.8

David MacQueen <[email protected]> Tue, 01 Aug 2006 16:01:22 -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-serv4880/FLINT/kernel

Modified Files:
      Tag: primop-branch-2
	ltykernel.sig ltykernel.sml 
Log Message:
added rule comments to ltykernel.sml

Index: ltykernel.sig
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/kernel/ltykernel.sig,v
retrieving revision 1.11.24.3
retrieving revision 1.11.24.4
diff -C2 -d -r1.11.24.3 -r1.11.24.4
*** ltykernel.sig	31 Jul 2006 23:29:45 -0000	1.11.24.3
--- ltykernel.sig	1 Aug 2006 23:01:19 -0000	1.11.24.4
***************
*** 95,99 ****
  val initTycEnv : tycEnv
  val tcInsert : tycEnv * (tyc list option * int) -> tycEnv
! val tcSplit : tycEnv -> ((tyc list option * int) * tycEnv) option 
  (* val tycEnvOut : tycEnv -> tycI *)
  
--- 95,99 ----
  val initTycEnv : tycEnv
  val tcInsert : tycEnv * (tyc list option * int) -> tycEnv
! val tcSplit : tycEnv -> ((tyc list option * int) * tycEnv) option
  (* val tycEnvOut : tycEnv -> tycI *)
  
***************
*** 151,153 ****
--- 151,159 ----
  val wrap_token    : token
  
+ (** pretty printing of tkinds, tycs, and ltys *)
+ (* (temporarily?) moved from ltybasic.sig *)
+ val tk_print   : tkind -> string
+ val tc_print   : tyc -> string
+ val lt_print   : lty -> string
+ 
  end (* signature LTYKERNEL *)

Index: ltykernel.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/FLINT/kernel/ltykernel.sml,v
retrieving revision 1.18.12.7
retrieving revision 1.18.12.8
diff -C2 -d -r1.18.12.7 -r1.18.12.8
*** ltykernel.sml	31 Jul 2006 23:29:45 -0000	1.18.12.7
--- ltykernel.sml	1 Aug 2006 23:01:19 -0000	1.18.12.8
***************
*** 797,802 ****
                           (let val et = tcLookup(i, tenv)
                             in case et 
!                                of (NONE, n) => tcc_var(nl - n, j)
!                                 | (SOME ts, n) => 
                                      (let val y = List.nth(ts, j) 
                                             handle Subscript => 
--- 797,802 ----
                           (let val et = tcLookup(i, tenv)
                             in case et 
!                                of (NONE, n) => tcc_var(nl - n, j) (* rule r5 *)
!                                 | (SOME ts, n) =>  
                                      (let val y = List.nth(ts, j) 
                                             handle Subscript => 
***************
*** 810,824 ****
                       app (fn tc => (print(tc_print tc); print "\n")) ts;
  						   raise tcUnbound tenv)
!                                       in h(y, 0, nl - n, initTycEnv)
                                       end)
                            end)
!                        else tcc_var(i-ol+nl, j)
                     | TC_NVAR _ => x
!                    | TC_PRIM _ => x
                     | TC_FN (ks, tc) => 
                        let val tenv' = tcInsert(tenv, (NONE, nl))
!                        in tcc_fn(ks, tcc_env(tc, ol+1, nl+1, tenv'))
                        end
!                    | TC_APP (tc, tcs) => tcc_app(prop tc, map prop tcs)
                     | TC_SEQ tcs => tcc_seq (map prop tcs)
                     | TC_PROJ (tc, i) => tcc_proj(prop tc, i)
--- 810,824 ----
                       app (fn tc => (print(tc_print tc); print "\n")) ts;
  						   raise tcUnbound tenv)
!                                       in h(y, 0, nl - n, initTycEnv)  (* rule r6 *)
                                       end)
                            end)
!                        else tcc_var(i-ol+nl, j) (* rule r4 *)
                     | TC_NVAR _ => x
!                    | TC_PRIM _ => x    (* rule r7 *)
                     | TC_FN (ks, tc) => 
                        let val tenv' = tcInsert(tenv, (NONE, nl))
!                        in tcc_fn(ks, tcc_env(tc, ol+1, nl+1, tenv')) (* rule r10 *)
                        end
!                    | TC_APP (tc, tcs) => tcc_app(prop tc, map prop tcs) (* rule r9 *)
                     | TC_SEQ tcs => tcc_seq (map prop tcs)
                     | TC_PROJ (tc, i) => tcc_proj(prop tc, i)
***************
*** 830,834 ****
                     | TC_TUPLE (rk, tcs) => tcc_tup (rk, map prop tcs)
                     | TC_ARROW (r, ts1, ts2) => 
!                        tcc_arw (r, map prop ts1, map prop ts2)
                     | TC_PARROW (t1, t2) => tcc_parw (prop t1, prop t2)
                     | TC_TOKEN (k, t) => tcc_token(k, prop t)
--- 830,834 ----
                     | TC_TUPLE (rk, tcs) => tcc_tup (rk, map prop tcs)
                     | TC_ARROW (r, ts1, ts2) => 
!                        tcc_arw (r, map prop ts1, map prop ts2)  (* rule r8 *)
                     | TC_PARROW (t1, t2) => tcc_parw (prop t1, prop t2)
                     | TC_TOKEN (k, t) => tcc_token(k, prop t)
***************
*** 836,840 ****
                     | TC_IND (tc, _) => h(tc, ol, nl, tenv)
                     | TC_ENV(tc, ol', nl', tenv') => 
!                        if ol = 0 then h(tc, ol', nl+nl', tenv')
                         else h(g x, ol, nl, tenv))
              end (* function h *)
--- 836,840 ----
                     | TC_IND (tc, _) => h(tc, ol, nl, tenv)
                     | TC_ENV(tc, ol', nl', tenv') => 
!                        if ol = 0 then h(tc, ol', nl+nl', tenv')  (* rule r11 *)
                         else h(g x, ol, nl, tenv))
              end (* function h *)


-------------------------------------------------------------------------
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