From 66c0bffc1741a43244ad8e0946af1b9ea0353860 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 19 Jul 2019 10:59:02 -0400 Subject: [PATCH] Instantiate. --- semantic-core/src/Analysis/Eval.hs | 2 +- semantic-core/src/Data/Core/Pretty.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/semantic-core/src/Analysis/Eval.hs b/semantic-core/src/Analysis/Eval.hs index cfa2689a8..e42a7ec05 100644 --- a/semantic-core/src/Analysis/Eval.hs +++ b/semantic-core/src/Analysis/Eval.hs @@ -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 diff --git a/semantic-core/src/Data/Core/Pretty.hs b/semantic-core/src/Data/Core/Pretty.hs index f4b01d1a5..92280c0fd 100644 --- a/semantic-core/src/Data/Core/Pretty.hs +++ b/semantic-core/src/Data/Core/Pretty.hs @@ -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 "\\"