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

SCM Repository

[smlnj] Diff of /sml/trunk/src/cm/semant/primitive.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 273, Wed May 12 08:38:51 1999 UTC revision 274, Fri May 14 05:23:02 1999 UTC
# Line 1  Line 1 
1    (*
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  signature PRIMITIVE = sig  signature PRIMITIVE = sig
10    
11      type primitive      type primitive
12    
13      val fromString : string -> primitive      val fromString : string -> primitive option
14      val toString : primitive -> string      val toString : primitive -> string
15    
16      val exports: primitive -> SymbolSet.set      val exports: primitive -> SymbolSet.set
# Line 10  Line 18 
18    
19  structure Primitive :> PRIMITIVE = struct  structure Primitive :> PRIMITIVE = struct
20    
21      type primitive = Dummy.t      datatype primitive = CORE | HELPER
22    
23      fun fromString s = Dummy.f ()      fun fromString "primitive_core" = SOME CORE
24      fun toString p = Dummy.f ()        | fromString "primitive_helper" = SOME HELPER
25      fun exports p = Dummy.f ()        | 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  end  end

Legend:
Removed from v.273  
changed lines
  Added in v.274

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