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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 274 - (download) (annotate)
Fri May 14 05:23:02 1999 UTC (21 years, 1 month ago) by blume
File size: 756 byte(s)
stage0 -- links fine (for testing); parses correctly (apparently)
(*
 * "Primitive" classes in CM.
 *   - provide access to compiler internals in an orderly fashion
 *
 * (C) 1999 Lucent Technologies, Bell Laboratories
 *
 * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
 *)
signature PRIMITIVE = sig

    type primitive

    val fromString : string -> primitive option
    val toString : primitive -> string

    val exports: primitive -> SymbolSet.set
end

structure Primitive :> PRIMITIVE = struct

    datatype primitive = CORE | HELPER

    fun fromString "primitive_core" = SOME CORE
      | fromString "primitive_helper" = SOME HELPER
      | fromString _ = NONE

    fun toString CORE = "primitive_core"
      | toString HELPER = "primitive_helper"

    fun exports p = (ignore Dummy.v; SymbolSet.empty)
end

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