CVS: sml-dist/src/compiler/ElabData/types typesutil.sml, 1.3.2.16, 1.3.2.17

David MacQueen <[email protected]> Wed, 23 Aug 2006 16:44:19 -0700
Newsgroups gmane.comp.lang.sml.smlnj.commits
Message-ID <[email protected]>
Update of /cvsroot/smlnj/sml-dist/src/compiler/ElabData/types
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv811/src/compiler/ElabData/types

Modified Files:
      Tag: primop-branch-2
	typesutil.sml 
Log Message:
debugging kind check error

Index: typesutil.sml
===================================================================
RCS file: /cvsroot/smlnj/sml-dist/src/compiler/ElabData/types/typesutil.sml,v
retrieving revision 1.3.2.16
retrieving revision 1.3.2.17
diff -C2 -d -r1.3.2.16 -r1.3.2.17
*** typesutil.sml	26 Jul 2006 15:21:40 -0000	1.3.2.16
--- typesutil.sml	23 Aug 2006 23:44:17 -0000	1.3.2.17
***************
*** 199,211 ****
  (*** This function should be merged with instantiatePoly soon --zsh
       dbm: don't agree! ***)
! fun applyTyfun(TYFUN{arity,body},args) =
    let fun subst(IBOUND n) = List.nth(args,n)
          | subst(CONty(tyc,args)) = CONty(tyc, shareMap subst args)
          | subst(VARty(ref(INSTANTIATED ty))) = subst ty
          | subst _ = raise SHARE
!    in if arity > 0
!       then subst body
!               handle SHARE => body
! 		   | Subscript => bug "applyTyfun - not enough arguments"
        else body
    end
--- 199,213 ----
  (*** This function should be merged with instantiatePoly soon --zsh
       dbm: don't agree! ***)
! fun applyTyfun(TYFUN{arity,body}, args: ty list) =
    let fun subst(IBOUND n) = List.nth(args,n)
          | subst(CONty(tyc,args)) = CONty(tyc, shareMap subst args)
          | subst(VARty(ref(INSTANTIATED ty))) = subst ty
          | subst _ = raise SHARE
!    in if arity <> length args
!         then bug "applyTyfun: arity mismatch"
!       else if arity > 0
!         then subst body
!              handle SHARE => body
! 		  | Subscript => bug "applyTyfun - not enough arguments"
        else body
    end
***************
*** 444,448 ****
     if argument is not a POLYty, does nothing, returning argument type *)
  fun instantiatePoly(POLYty{sign,tyfun}) : ty * tyvar list =
!       let val args =
  	      map (fn eq => 
  		      ref(OPEN{kind = META, depth = infinity, eq = eq}))
--- 446,450 ----
     if argument is not a POLYty, does nothing, returning argument type *)
  fun instantiatePoly(POLYty{sign,tyfun}) : ty * tyvar list =
!       let val args =  (* fresh OPEN metavariables *)
  	      map (fn eq => 
  		      ref(OPEN{kind = META, depth = infinity, eq = eq}))


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