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 /pgraph/releases/release-110.64/generic-ops.sml
ViewVC logotype

Diff of /pgraph/releases/release-110.64/generic-ops.sml

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

revision 977, Wed Nov 14 16:53:16 2001 UTC revision 1011, Thu Jan 10 20:22:04 2002 UTC
# Line 8  Line 8 
8    
9      type ('lib, 'env, 'sym, 'syms, 'export, 'misc) context      type ('lib, 'env, 'sym, 'syms, 'export, 'misc) context
10    
11      val sym : ('lib, 'env, 'sym, 'syms, 'export, 'misc) context      val sgn : ('lib, 'env, 'sym, 'syms, 'export, 'misc) context
12                -> string -> string                -> string
13                  -> ('lib, 'env, 'sym, 'syms, 'export, 'misc) context * 'sym
14        val str : ('lib, 'env, 'sym, 'syms, 'export, 'misc) context
15                  -> string
16                  -> ('lib, 'env, 'sym, 'syms, 'export, 'misc) context * 'sym
17        val fct : ('lib, 'env, 'sym, 'syms, 'export, 'misc) context
18                  -> string
19                -> ('lib, 'env, 'sym, 'syms, 'export, 'misc) context * 'sym                -> ('lib, 'env, 'sym, 'syms, 'export, 'misc) context * 'sym
20      val syms : ('lib, 'env, 'sym, 'syms, 'export, 'misc) context      val syms : ('lib, 'env, 'sym, 'syms, 'export, 'misc) context
21                 -> 'sym list                 -> 'sym list
# Line 37  Line 43 
43  structure PGOps : PG_OPS = struct  structure PGOps : PG_OPS = struct
44    
45      type ('lib, 'env, 'sym, 'syms, 'export, 'misc) context =      type ('lib, 'env, 'sym, 'syms, 'export, 'misc) context =
46           { Ops : { Sym: 'misc -> string * string -> 'misc * 'sym,           { Ops : { Sgn: 'misc -> string -> 'misc * 'sym,
47                       Str: 'misc -> string -> 'misc * 'sym,
48                       Fct: 'misc -> string -> 'misc * 'sym,
49                     Imp: 'misc -> 'lib * 'syms -> 'misc * 'env,                     Imp: 'misc -> 'lib * 'syms -> 'misc * 'env,
50                     Com: 'misc -> string * 'env * 'syms * bool -> 'misc * 'env,                     Com: 'misc -> string * 'env * 'syms * bool -> 'misc * 'env,
51                     Mer: 'misc -> 'env list -> 'misc * 'env,                     Mer: 'misc -> 'env list -> 'misc * 'env,
# Line 47  Line 55 
55             Misc: 'misc }             Misc: 'misc }
56    
57      local      local
58          fun generic { Ops = Ops as { Sym, Imp, Com, Mer, Fil, Syms, Exp },          fun generic { Ops = Ops as { Sgn, Str, Fct,
59                                         Imp, Com, Mer, Fil, Syms, Exp },
60                        Misc }                        Misc }
61                      sel args =                      sel args =
62              let val (Misc', res) = sel Ops Misc args              let val (Misc', res) = sel Ops Misc args
63              in ({ Ops = Ops, Misc = Misc' }, res)              in ({ Ops = Ops, Misc = Misc' }, res)
64              end              end
65      in      in
66      fun sym c ns s = generic c #Sym (ns, s)      fun sgn c s = generic c #Sgn s
67        fun str c s = generic c #Str s
68        fun fct c s = generic c #Fct s
69      fun syms c sl = generic c #Syms sl      fun syms c sl = generic c #Syms sl
70      fun import c l ss = generic c #Imp (l, ss)      fun import c l ss = generic c #Imp (l, ss)
71      fun compile c s e ss = generic c #Com (s, e, ss, false)      fun compile c s e ss = generic c #Com (s, e, ss, false)
72      fun ncompile c s e ss = generic c #Com (s, e, ss, true)      fun ncompile c s e ss = generic c #Com (s, e, ss, true)
73      fun merge c el = generic c #Mer el      fun merge c el = generic c #Mer el
74      fun filter c e ss = generic c #Fil (e, ss)      fun filter c e ss = generic c #Fil (e, ss)
75      fun export { Ops = { Sym, Imp, Com, Mer, Fil, Syms, Exp }, Misc } e =      fun export { Ops = { Sgn, Str, Fct, Imp, Com, Mer, Fil, Syms, Exp },
76                     Misc } e =
77          Exp Misc e          Exp Misc e
78      end      end
79  end  end

Legend:
Removed from v.977  
changed lines
  Added in v.1011

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