Skip to content

Commit 1f4f7ea

Browse files
explain what we're doing
1 parent e069718 commit 1f4f7ea

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+
-- The first two cases here are an optimization to avoid dispatching to `mapMList` (which does all sorts of
108+
-- unpacking and packing and doesn't fuse nicely with `uncurryList_`)
107109
App f (ta :> Nil) -> semantics f <$> runTermE env ta
108110
App f (ta :> tb :> Nil) -> semantics f <$> runTermE env ta <*> runTermE env tb
109111
App f ts -> do

0 commit comments

Comments
 (0)