Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/basis/basis.sml
ViewVC logotype

Diff of /trunk/src/basis/basis.sml

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

revision 83, Wed May 26 18:50:44 2010 UTC revision 86, Wed May 26 22:23:17 2010 UTC
# Line 28  Line 28 
28            BV.op_D,            BV.op_D,
29            BV.op_norm,            BV.op_norm,
30            BV.op_not,            BV.op_not,
31              BV.op_subscript,
32          (* functions *)          (* functions *)
33            BV.fn_CL,            BV.fn_CL,
34            BV.fn_convolve,            BV.fn_convolve,
# Line 69  Line 70 
70          ]          ]
71    
72      local      local
73        val lookup = let        val find = let
74              val tbl = ATbl.mkTable(64, Fail "op table")              val tbl = ATbl.mkTable(64, Fail "op table")
75              in              in
76                List.app (ATbl.insert tbl) overloads;                List.app (ATbl.insert tbl) overloads;
77                ATbl.lookup tbl                ATbl.find tbl
78              end              end
79      in      in
80      fun findOp name = (case Env.findVar(env, name)      fun findOp name = (case Env.findVar(env, name)
81             of SOME x => [x]             of SOME x => [x]
82              | NONE => lookup name              | NONE => (case find name
83                     of SOME xs => xs
84                      | NONE => raise Fail("unknown operator "^Atom.toString name)
85                    (* end case *))
86            (* end case *))            (* end case *))
87      end (* local *)      end (* local *)
88    

Legend:
Removed from v.83  
changed lines
  Added in v.86

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