Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 7ee77a5

Browse files
committed
Map free vars onto exceptions.
This is almost certainly wrong overall, but it's a start.
1 parent fc41b3b commit 7ee77a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

semantic-analysis/src/Analysis/Exception.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ instance (Algebra sig m, Alternative m) => Algebra (Dom ExcSet :+: sig) (ExcC m)
5959
DIf c t e -> fmap (mappend c) <$> runExcC (hdl (t <$ ctx) <|> hdl (e <$ ctx))
6060
DString _ -> pure nil
6161
-- FIXME: return a set indicating a failure with e as the payload
62-
DDie e -> pure $ e <$ ctx
62+
DDie e -> pure $ e <> fromExceptions [Exception n | n <- Set.toList (freeVariables e)] <$ ctx
6363
where
6464
nil = (mempty :: ExcSet) <$ ctx
6565

0 commit comments

Comments
 (0)