Skip to content

Commit e069718

Browse files
simplify runTermE
1 parent 3730642 commit e069718

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Constrained/AbstractSyntax.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ runTermE env = \case
104104
V v -> case Env.lookup env v of
105105
Just a -> Right a
106106
Nothing -> Left (pure ("Couldn't find " ++ show v ++ " in " ++ show env))
107+
App f (ta :> Nil) -> semantics f <$> runTermE env ta
108+
App f (ta :> tb :> Nil) -> semantics f <$> runTermE env ta <*> runTermE env tb
107109
App f ts -> do
108110
vs <- mapMList (fmap Identity . runTermE env) ts
109111
pure $ uncurryList_ runIdentity (semantics f) vs

0 commit comments

Comments
 (0)