src/Tools/nbe.ML
changeset 31724 9b5a128cdb5c
parent 31156 90fed3d4430f
child 31888 626c075fd457
equal deleted inserted replaced
31723:f5cafe803b55 31724:9b5a128cdb5c
   190           let
   190           let
   191             val (t', ts) = Code_Thingol.unfold_app t
   191             val (t', ts) = Code_Thingol.unfold_app t
   192           in of_iapp match_cont t' (fold_rev (cons o of_iterm NONE) ts []) end
   192           in of_iapp match_cont t' (fold_rev (cons o of_iterm NONE) ts []) end
   193         and of_iapp match_cont (IConst (c, ((_, dss), _))) ts = constapp c dss ts
   193         and of_iapp match_cont (IConst (c, ((_, dss), _))) ts = constapp c dss ts
   194           | of_iapp match_cont (IVar v) ts = nbe_apps (nbe_bound v) ts
   194           | of_iapp match_cont (IVar v) ts = nbe_apps (nbe_bound v) ts
   195           | of_iapp match_cont ((v, _) `|-> t) ts =
   195           | of_iapp match_cont ((v, _) `|=> t) ts =
   196               nbe_apps (nbe_abss 1 (ml_abs (ml_list [nbe_bound v]) (of_iterm NONE t))) ts
   196               nbe_apps (nbe_abss 1 (ml_abs (ml_list [nbe_bound v]) (of_iterm NONE t))) ts
   197           | of_iapp match_cont (ICase (((t, _), cs), t0)) ts =
   197           | of_iapp match_cont (ICase (((t, _), cs), t0)) ts =
   198               nbe_apps (ml_cases (of_iterm NONE t)
   198               nbe_apps (ml_cases (of_iterm NONE t)
   199                 (map (fn (p, t) => (of_iterm NONE p, of_iterm match_cont t)) cs
   199                 (map (fn (p, t) => (of_iterm NONE p, of_iterm match_cont t)) cs
   200                   @ [("_", case match_cont of SOME s => s | NONE => of_iterm NONE t0)])) ts
   200                   @ [("_", case match_cont of SOME s => s | NONE => of_iterm NONE t0)])) ts