equal
deleted
inserted
replaced
190 case !compiled_rewriter of |
190 case !compiled_rewriter of |
191 NONE => raise (Compile "cannot communicate with compiled function") |
191 NONE => raise (Compile "cannot communicate with compiled function") |
192 | SOME r => (compiled_rewriter := NONE; r) |
192 | SOME r => (compiled_rewriter := NONE; r) |
193 end |
193 end |
194 |
194 |
195 fun compile eqs = |
195 fun compile cache_patterns const_arity eqs = |
196 let |
196 let |
197 val _ = if exists (fn (a,b,c) => not (null a)) eqs then raise Compile ("cannot deal with guards") else () |
197 val _ = if exists (fn (a,b,c) => not (null a)) eqs then raise Compile ("cannot deal with guards") else () |
198 val eqs = map (fn (a,b,c) => (b,c)) eqs |
198 val eqs = map (fn (a,b,c) => (b,c)) eqs |
199 fun check (p, r) = if check_freevars (count_patternvars p) r then () else raise Compile ("unbound variables in rule") |
199 fun check (p, r) = if check_freevars (count_patternvars p) r then () else raise Compile ("unbound variables in rule") |
200 val _ = map (fn (p, r) => |
200 val _ = map (fn (p, r) => |