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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/compiler/ElabData/main/compinfo.sml
ViewVC logotype

Annotation of /sml/trunk/src/compiler/ElabData/main/compinfo.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 902 - (view) (download)

1 : blume 902 (* compinfo.sml
2 :     *
3 :     * (C) 2001 Lucent Technologies, Bell Labs
4 :     *)
5 :     structure CompInfo = struct
6 :    
7 :     type 'absyn compInfo = { mkStamp: unit -> Stamps.stamp,
8 :     mkLvar: Symbol.symbol option -> Access.lvar,
9 :     anyErrors: bool ref,
10 :     error: ErrorMsg.errorFn,
11 :     errorMatch: SourceMap.region -> string,
12 :     transform: 'absyn -> 'absyn,
13 :     sourceName : string }
14 :    
15 :     fun mkCompInfo { source, transform : 'a -> 'a, mkMkStamp } = let
16 :     val { error, errorMatch, anyErrors } = ErrorMsg.errors source
17 :     val _ = LambdaVar.clear ()
18 :     val g = mkMkStamp ()
19 :     fun mkLvar NONE = LambdaVar.mkLvar ()
20 :     | mkLvar (SOME sym) = LambdaVar.namedLvar sym
21 :     in
22 :     { mkStamp = fn () => Stamps.fresh g,
23 :     mkLvar = mkLvar,
24 :     anyErrors = anyErrors,
25 :     error = error,
26 :     errorMatch = errorMatch,
27 :     transform = transform,
28 :     sourceName = #fileOpened source } : 'a compInfo
29 :     end
30 :    
31 :     fun anyErrors (ci : 'a compInfo) = ! (#anyErrors ci)
32 :    
33 :     end (* structure CompBasic *)

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