src/Pure/ML-Systems/ml_name_space.ML
changeset 30671 2f64540707d6
parent 29564 f8b933a62151
child 56275 600f432ab556
equal deleted inserted replaced
30670:9bb872667af6 30671:2f64540707d6
     2     Author:     Makarius
     2     Author:     Makarius
     3 
     3 
     4 ML name space -- dummy version of Poly/ML 5.2 facility.
     4 ML name space -- dummy version of Poly/ML 5.2 facility.
     5 *)
     5 *)
     6 
     6 
     7 structure ML_NameSpace =
     7 structure ML_Name_Space =
     8 struct
     8 struct
     9 
     9 
    10 type valueVal = unit;
    10 type valueVal = unit;
    11 type typeVal = unit;
    11 type typeVal = unit;
    12 type fixityVal = unit;
    12 type fixityVal = unit;
    13 type structureVal = unit;
    13 type structureVal = unit;
    14 type signatureVal = unit;
    14 type signatureVal = unit;
    15 type functorVal = unit;
    15 type functorVal = unit;
    16 
    16 
    17 type nameSpace =
    17 type T =
    18  {lookupVal:    string -> valueVal option,
    18  {lookupVal:    string -> valueVal option,
    19   lookupType:   string -> typeVal option,
    19   lookupType:   string -> typeVal option,
    20   lookupFix:    string -> fixityVal option,
    20   lookupFix:    string -> fixityVal option,
    21   lookupStruct: string -> structureVal option,
    21   lookupStruct: string -> structureVal option,
    22   lookupSig:    string -> signatureVal option,
    22   lookupSig:    string -> signatureVal option,
    32   allFix:       unit -> (string * fixityVal) list,
    32   allFix:       unit -> (string * fixityVal) list,
    33   allStruct:    unit -> (string * structureVal) list,
    33   allStruct:    unit -> (string * structureVal) list,
    34   allSig:       unit -> (string * signatureVal) list,
    34   allSig:       unit -> (string * signatureVal) list,
    35   allFunct:     unit -> (string * functorVal) list};
    35   allFunct:     unit -> (string * functorVal) list};
    36 
    36 
    37 val global: nameSpace =
    37 val global: T =
    38  {lookupVal = fn _ => NONE,
    38  {lookupVal = fn _ => NONE,
    39   lookupType = fn _ => NONE,
    39   lookupType = fn _ => NONE,
    40   lookupFix = fn _ => NONE,
    40   lookupFix = fn _ => NONE,
    41   lookupStruct = fn _ => NONE,
    41   lookupStruct = fn _ => NONE,
    42   lookupSig = fn _ => NONE,
    42   lookupSig = fn _ => NONE,