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/TopLevel/main/compinfo.sml
ViewVC logotype

View of /sml/trunk/src/compiler/TopLevel/main/compinfo.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 879 - (download) (annotate)
Thu Jul 19 18:59:38 2001 UTC (18 years, 7 months ago) by blume
File size: 1033 byte(s)
extensive organizational changes
(* compinfo.sml
 *
 * (C) 2001 Lucent Technologies, Bell Labs
 *)
structure CompInfo = struct

    type compInfo = { mkStamp: unit -> Stamps.stamp,
                      mkLvar: Symbol.symbol option -> Access.lvar,
                      anyErrors: bool ref,
                      error: ErrorMsg.errorFn,
                      errorMatch: SourceMap.region -> string,
                      transform: Absyn.dec -> Absyn.dec,
                      sourceName : string }

    fun mkCompInfo { source, transform, mkMkStamp } = let
	val { error, errorMatch, anyErrors } = ErrorMsg.errors source
	val _ = LambdaVar.clear ()
	val g = mkMkStamp ()
	fun mkLvar NONE = LambdaVar.mkLvar ()
	  | mkLvar (SOME sym) = LambdaVar.namedLvar sym
    in
	{ mkStamp = fn () => Stamps.fresh g,
	  mkLvar = mkLvar,
	  anyErrors = anyErrors,
	  error = error,
	  errorMatch = errorMatch,
	  transform = transform,
	  sourceName = #fileOpened source } : compInfo
    end

    fun anyErrors (ci : compInfo) = ! (#anyErrors ci)

end (* structure CompBasic *)

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