mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-13 09:55:35 +03:00
abstract operation is now type preserving
This commit is contained in:
parent
1e33941c90
commit
dc432c46d9
@ -17,4 +17,7 @@ apply f loc e = undefined
|
||||
abstract :: P.Path -> E.Term l t -> Maybe (E.Term l t)
|
||||
abstract loc e =
|
||||
let v = V.decr V.bound1 -- unused
|
||||
in (E.Lam . E.abstract v) <$> P.set (E.Var v) loc e
|
||||
in do
|
||||
arg <- P.at loc e
|
||||
f <- E.Lam . E.abstract v <$> P.set (E.Var v) loc e
|
||||
pure $ E.App f arg
|
||||
|
Loading…
Reference in New Issue
Block a user