src/Pure/Tools/am_interpreter.ML
changeset 17412 e26cb20ef0cc
parent 16842 5979c46853d1
child 17795 5b18c3343028
equal deleted inserted replaced
17411:664434175578 17412:e26cb20ef0cc
   105       | SOME args => SOME (Closure (args, eq))
   105       | SOME args => SOME (Closure (args, eq))
   106 
   106 
   107 fun match_closure prog clos =
   107 fun match_closure prog clos =
   108     case len_head_of_closure 0 clos of
   108     case len_head_of_closure 0 clos of
   109         (len, CConst c) =>
   109         (len, CConst c) =>
   110         (case prog_struct.lookup (prog, (c, len)) of
   110         (case prog_struct.lookup prog (c, len) of
   111             NONE => NONE
   111             NONE => NONE
   112           | SOME rules => match_rules 0 rules clos)
   112           | SOME rules => match_rules 0 rules clos)
   113       | _ => NONE
   113       | _ => NONE
   114 
   114 
   115 fun lift n (c as (CConst _)) = c
   115 fun lift n (c as (CConst _)) = c