mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Instantiate.
This commit is contained in:
parent
a45c029d86
commit
66c0bffc17
@ -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
|
||||
|
@ -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 "\\"
|
||||
|
Loading…
Reference in New Issue
Block a user