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

Commit 801144c

Browse files
committed
Define an ExcSet constructor taking a list of Exceptions.
1 parent f3ccc5b commit 801144c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

semantic-analysis/src/Analysis/Exception.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
module Analysis.Exception
88
( Exception(..)
99
, ExcSet(..)
10+
, fromExceptions
1011
, var
1112
, exc
1213
-- * Exception tracing analysis
@@ -32,6 +33,9 @@ instance Semigroup ExcSet where
3233
instance Monoid ExcSet where
3334
mempty = ExcSet mempty mempty
3435

36+
fromExceptions :: [Exception] -> ExcSet
37+
fromExceptions = ExcSet mempty . Set.fromList
38+
3539
var :: Name -> ExcSet
3640
var v = ExcSet (Set.singleton v) mempty
3741

0 commit comments

Comments
 (0)