src/Pure/ML-Systems/ml_name_space.ML
author wenzelm
Sat Nov 27 16:29:53 2010 +0100 (2010-11-27 ago)
changeset 40748 591b6778d076
parent 30671 2f64540707d6
child 56275 600f432ab556
permissions -rw-r--r--
removed bash from ML system bootstrap, and past the Secure ML barrier;
wenzelm@28267
     1
(*  Title:      Pure/ML-Systems/ml_name_space.ML
wenzelm@28267
     2
    Author:     Makarius
wenzelm@28267
     3
wenzelm@28267
     4
ML name space -- dummy version of Poly/ML 5.2 facility.
wenzelm@28267
     5
*)
wenzelm@28267
     6
wenzelm@30671
     7
structure ML_Name_Space =
wenzelm@28267
     8
struct
wenzelm@28267
     9
wenzelm@28267
    10
type valueVal = unit;
wenzelm@28267
    11
type typeVal = unit;
wenzelm@28267
    12
type fixityVal = unit;
wenzelm@28267
    13
type structureVal = unit;
wenzelm@28267
    14
type signatureVal = unit;
wenzelm@28267
    15
type functorVal = unit;
wenzelm@28267
    16
wenzelm@30671
    17
type T =
wenzelm@28267
    18
 {lookupVal:    string -> valueVal option,
wenzelm@28267
    19
  lookupType:   string -> typeVal option,
wenzelm@28267
    20
  lookupFix:    string -> fixityVal option,
wenzelm@28267
    21
  lookupStruct: string -> structureVal option,
wenzelm@28267
    22
  lookupSig:    string -> signatureVal option,
wenzelm@28267
    23
  lookupFunct:  string -> functorVal option,
wenzelm@28267
    24
  enterVal:     string * valueVal -> unit,
wenzelm@28267
    25
  enterType:    string * typeVal -> unit,
wenzelm@28267
    26
  enterFix:     string * fixityVal -> unit,
wenzelm@28267
    27
  enterStruct:  string * structureVal -> unit,
wenzelm@28267
    28
  enterSig:     string * signatureVal -> unit,
wenzelm@28267
    29
  enterFunct:   string * functorVal -> unit,
wenzelm@28267
    30
  allVal:       unit -> (string * valueVal) list,
wenzelm@28267
    31
  allType:      unit -> (string * typeVal) list,
wenzelm@28267
    32
  allFix:       unit -> (string * fixityVal) list,
wenzelm@28267
    33
  allStruct:    unit -> (string * structureVal) list,
wenzelm@28267
    34
  allSig:       unit -> (string * signatureVal) list,
wenzelm@28267
    35
  allFunct:     unit -> (string * functorVal) list};
wenzelm@28267
    36
wenzelm@30671
    37
val global: T =
wenzelm@28267
    38
 {lookupVal = fn _ => NONE,
wenzelm@28267
    39
  lookupType = fn _ => NONE,
wenzelm@28267
    40
  lookupFix = fn _ => NONE,
wenzelm@28267
    41
  lookupStruct = fn _ => NONE,
wenzelm@28267
    42
  lookupSig = fn _ => NONE,
wenzelm@28267
    43
  lookupFunct = fn _ => NONE,
wenzelm@28267
    44
  enterVal = fn _ => (),
wenzelm@28267
    45
  enterType = fn _ => (),
wenzelm@28267
    46
  enterFix = fn _ => (),
wenzelm@28267
    47
  enterStruct = fn _ => (),
wenzelm@28267
    48
  enterSig = fn _ => (),
wenzelm@28267
    49
  enterFunct = fn _ => (),
wenzelm@28267
    50
  allVal = fn _ => [],
wenzelm@28267
    51
  allType = fn _ => [],
wenzelm@28267
    52
  allFix = fn _ => [],
wenzelm@28267
    53
  allStruct = fn _ => [],
wenzelm@28267
    54
  allSig = fn _ => [],
wenzelm@28267
    55
  allFunct = fn _ => []};
wenzelm@28267
    56
wenzelm@28267
    57
end;