CVS: sml-dist/src/compiler/FLINT/kernel kindchk.sml, NONE, 1.1.2.1
George Kuan <[email protected]> Thu, 17 Aug 2006 08:36:19 -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-serv28224/kernel
Added Files:
Tag: primop-branch-2
kindchk.sml
Log Message:
beginning full FLINT kind checker
--- NEW FILE: kindchk.sml ---
structure KindChk =
struct
structure LT = LtyExtern
open Lty
datatype frame = Beta of int * tyc list * tkind list (* suspension from beta red, r1 *)
| Lam of int * tkind list (* lifted lambda at given nesting level, r10 *)
withtype env = frame list
(*
fun eqKind (TK_MONO, TK_MONO) = true
| eqKind (TK_BOX, TK_BOX) = true
| eqKind (TK_SEQ ks, TK_SEQ ks') = List.all eqKind (ListPair.zip (ks,ks'))
| eqKind (TK_FUN (paramks, retknd), TK_FUN (paramks', retknd')) =
(List.all eqKind (ListPair.zip (paramks, paramks'))) andalso eqKind(retknd,retknd')
*)
(* lty.sml has a tk_eq "pointer" equality on normalized tkind *)
(* ltyextern.sml has a tkSubkind and tksSubkind functions *)
(* ltyextern.sml has a tkTycGen() that returns a function that returns the
kind of a given tyc using a given kenv *)
fun chkKind(tyc : tyc, kenv) =
(case (tc_outX tyc) of
TC_VAR(n,argnum) => lookupKind(kenv, n, argnum)
| TC_NVAR(lv) => raise Fail "Unimplemented" (* ... *)
| TC_PRIM(ptyc) =>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642