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/cm/semant/primitive.sml
ViewVC logotype

Annotation of /sml/trunk/src/cm/semant/primitive.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 274 - (view) (download)

1 : blume 274 (*
2 :     * "Primitive" classes in CM.
3 :     * - provide access to compiler internals in an orderly fashion
4 :     *
5 :     * (C) 1999 Lucent Technologies, Bell Laboratories
6 :     *
7 :     * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
8 :     *)
9 : blume 270 signature PRIMITIVE = sig
10 :    
11 :     type primitive
12 :    
13 : blume 274 val fromString : string -> primitive option
14 : blume 273 val toString : primitive -> string
15 : blume 272
16 : blume 270 val exports: primitive -> SymbolSet.set
17 :     end
18 :    
19 : blume 272 structure Primitive :> PRIMITIVE = struct
20 : blume 270
21 : blume 274 datatype primitive = CORE | HELPER
22 : blume 270
23 : blume 274 fun fromString "primitive_core" = SOME CORE
24 :     | fromString "primitive_helper" = SOME HELPER
25 :     | fromString _ = NONE
26 :    
27 :     fun toString CORE = "primitive_core"
28 :     | toString HELPER = "primitive_helper"
29 :    
30 :     fun exports p = (ignore Dummy.v; SymbolSet.empty)
31 : blume 270 end

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