-let rec scott_of_nf =
- function
- | `N n -> Scott.mk_n n
- | `Var(v,_) -> Pure.V v
- | `Match(t,_,liftno,bs,args) ->
- let bs = List.map (fun (n,t) -> n, scott_of_nf (lift liftno (t :> nf))) !bs in
- let t = scott_of_nf (t :> nf) in
- let m = Scott.mk_match t bs in
- List.fold_left (fun acc t -> Pure.A(acc,scott_of_nf t)) m (args :> nf list)
- | `I((v,_), args) -> Listx.fold_left (fun acc t -> Pure.A(acc,scott_of_nf t)) (Pure.V v) (args :> nf Listx.listx)
- | `Lam(b,f) -> Pure.L (scott_of_nf f)
- | `Bottom -> let f x = Pure.A (x,x) in f (Pure.L (f (Pure.V 0)))
- | `Pacman -> let f x = Pure.A (x,x) in f (Pure.L (Pure.L (f (Pure.V 0))))
+let rec scott_of_nf = function
+ | `N n -> Scott.mk_n n
+ | `Var(v,_) -> Pure.V v
+ | `Match(t,_,liftno,bs,args) ->
+ let bs = List.map (fun (n,t) -> n, scott_of_nf (lift liftno (t :> nf))) !bs in
+ let t = scott_of_nf (t :> nf) in
+ let m = Scott.mk_match t bs in
+ List.fold_left (fun acc t -> Pure.A(acc,scott_of_nf t)) m (args :> nf list)
+ | `I((v,_), args) -> Listx.fold_left (fun acc t -> Pure.A(acc,scott_of_nf t)) (Pure.V v) (args :> nf Listx.listx)
+ | `Lam(_,t) -> Pure.L (scott_of_nf t)
+ | `Bottom -> Pure.B
+ | `Pacman -> let f x = Pure.A (x,x) in f (Pure.L (Pure.L (f (Pure.V 0))))