src/HOL/Matrix/Compute_Oracle/am_compiler.ML
changeset 46534 55fea563fbee
parent 46531 eff798e48efc
child 46537 84f20233d466
equal deleted inserted replaced
46533:faf233c4a404 46534:55fea563fbee
   188         case !compiled_rewriter of 
   188         case !compiled_rewriter of 
   189             NONE => raise (Compile "cannot communicate with compiled function")
   189             NONE => raise (Compile "cannot communicate with compiled function")
   190           | SOME r => (compiled_rewriter := NONE; r)
   190           | SOME r => (compiled_rewriter := NONE; r)
   191     end 
   191     end 
   192 
   192 
   193 fun compile _ _ eqs = 
   193 fun compile eqs = 
   194     let
   194     let
   195         val _ = if exists (fn (a,_,_) => not (null a)) eqs then raise Compile ("cannot deal with guards") else ()
   195         val _ = if exists (fn (a,_,_) => not (null a)) eqs then raise Compile ("cannot deal with guards") else ()
   196         val eqs = map (fn (_,b,c) => (b,c)) eqs
   196         val eqs = map (fn (_,b,c) => (b,c)) eqs
   197         fun check (p, r) = if check_freevars (count_patternvars p) r then () else raise Compile ("unbound variables in rule") 
   197         fun check (p, r) = if check_freevars (count_patternvars p) r then () else raise Compile ("unbound variables in rule") 
   198         val _ = map (fn (p, r) => 
   198         val _ = map (fn (p, r) =>