1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Instantiate.

This commit is contained in:
Rob Rix 2019-07-19 10:59:02 -04:00
parent a45c029d86
commit 66c0bffc17
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ eval Analysis{..} eval = \case
Term c -> case c of
Let n -> alloc n >>= bind n >> unit
a :>> b -> eval a >> eval b
Lam (Ignored n) b -> abstract eval n (fromScope (incr (const (pure n)) id) b)
Lam (Ignored n) b -> abstract eval n (instantiate1 (pure n) b)
f :$ a -> do
f' <- eval f
a' <- eval a

View File

@ -105,7 +105,7 @@ prettyCore style = run . runReader @Prec 0 . go
-- Annotations are not pretty-printed, as it lowers the signal/noise ratio too profoundly.
Ann _ c -> go c
where bind (Ignored x) f = (,) x <$> go (fromScope (incr (const (pure x)) id) f)
where bind (Ignored x) f = (,) x <$> go (instantiate1 (pure x) f)
lambda = case style of
Unicode -> symbol "λ"
Ascii -> symbol "\\"