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

Commit f3e46f3

Browse files
committed
Define substitution for ExcSet.
1 parent c7fc67c commit f3e46f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

semantic-analysis/src/Analysis/Analysis/Exception.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module Analysis.Analysis.Exception
1414
, fromExceptions
1515
, var
1616
, exc
17+
, subst
1718
-- * Exception tracing analysis
1819
, ExcC(..)
1920
) where
@@ -62,6 +63,9 @@ var v = ExcSet (Set.singleton v) mempty
6263
exc :: Exception -> ExcSet
6364
exc e = ExcSet mempty (Set.singleton e)
6465

66+
subst :: Name -> ExcSet -> ExcSet -> ExcSet
67+
subst name (ExcSet fvs' es') (ExcSet fvs es) = ExcSet (Set.delete name fvs <> fvs') (es <> es')
68+
6569

6670
exceptionTracing
6771
:: Ord term

0 commit comments

Comments
 (0)