From 99ec8a1758d022d0740b2adee18097a6823788aa Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Wed, 29 Nov 2017 13:57:48 -0800 Subject: [PATCH] Calling subcontext keeps the env intact --- src/Data/Syntax.hs | 2 +- src/Data/Syntax/Type.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Syntax.hs b/src/Data/Syntax.hs index 0059bd44a..f68a96749 100644 --- a/src/Data/Syntax.hs +++ b/src/Data/Syntax.hs @@ -221,4 +221,4 @@ instance Ord1 Context where liftCompare = genericLiftCompare instance Show1 Context where liftShowsPrec = genericLiftShowsPrec instance (Monad m) => Eval t v m Context where - eval ev yield Context{..} = ev pure contextSubject >>= yield + eval ev yield Context{..} = ev yield contextSubject diff --git a/src/Data/Syntax/Type.hs b/src/Data/Syntax/Type.hs index 921fb193e..fb5f674fb 100644 --- a/src/Data/Syntax/Type.hs +++ b/src/Data/Syntax/Type.hs @@ -21,7 +21,7 @@ instance Show1 Annotation where liftShowsPrec = genericLiftShowsPrec -- TODO: Specialize Eval for Type to unify the inferred type of the subject with the specified type instance (Monad m) => Eval t v m Annotation where - eval recur yield Annotation{..} = recur pure annotationSubject >>= yield + eval recur yield Annotation{..} = recur yield annotationSubject newtype Product a = Product { productElements :: [a] }