src/Pure/Proof/extraction.ML
changeset 32738 15bb09ca0378
parent 32035 8e77b6a250d5
child 32784 1a5dde5079ac
equal deleted inserted replaced
32737:76fa673eee8b 32738:15bb09ca0378
    89   let
    89   let
    90     fun rew tm =
    90     fun rew tm =
    91       Pattern.rewrite_term thy [] (condrew' :: procs) tm
    91       Pattern.rewrite_term thy [] (condrew' :: procs) tm
    92     and condrew' tm =
    92     and condrew' tm =
    93       let
    93       let
    94         val cache = ref ([] : (term * term) list);
    94         val cache = Unsynchronized.ref ([] : (term * term) list);
    95         fun lookup f x = (case AList.lookup (op =) (!cache) x of
    95         fun lookup f x = (case AList.lookup (op =) (!cache) x of
    96             NONE =>
    96             NONE =>
    97               let val y = f x
    97               let val y = f x
    98               in (cache := (x, y) :: !cache; y) end
    98               in (cache := (x, y) :: !cache; y) end
    99           | SOME y => y);
    99           | SOME y => y);