Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/compiler/ElabData/syntax/varcon.sml
ViewVC logotype

View of /sml/trunk/src/compiler/ElabData/syntax/varcon.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 902 - (download) (annotate)
Wed Aug 15 21:17:05 2001 UTC (19 years ago) by blume
File size: 1241 byte(s)
new organization of compiler libraries
(* varcon.sml
 *
 * (C) 2001 Lucent Technologies, Bell Labs
 *)
structure VarCon : VARCON =
struct

local structure A  = Access
      structure T  = Types
      structure S  = Symbol
      structure SP = SymPath


in

datatype var
  = VALvar of 		              (* ordinary variables *)
      {path : SP.path,
       typ : T.ty ref,
       access : A.access,
       info : II.ii}
  | OVLDvar of       	      	      (* overloaded identifier *)
      {name : S.symbol,
       options: {indicator: T.ty, variant: var} list ref,
       scheme: T.tyfun}
  | ERRORvar

type datacon = T.datacon                     

datatype value
  = VAL of var
  | CON of datacon

fun mkVALvar (id, acc) =
      VALvar{path = SP.SPATH [id], 
             typ = ref T.UNDEFty,
             access = acc,
             info = II.Null}

val bogusCON = T.DATACON{name=S.varSymbol "bogus",
                         typ=T.WILDCARDty,
                         rep=A.CONSTANT 0,
                         const=true,
			 lazyp=false,
                         sign=A.CSIG(0,1)}

fun mkBogusEXN exnTy = T.DATACON{name=S.varSymbol "bogus",
				 typ=exnTy,
				 rep=A.CONSTANT 0,
				 const=true,
				 lazyp=false,
				 sign=A.CNIL}

end (* local *)
end (* structure VarCon *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0