Skip to content

Commit

Permalink
precise-side-effects: Increase SomeException handling priority for :-
Browse files Browse the repository at this point in the history
Allows SomeException to work with an unknown/open exception list.
  • Loading branch information
queezle42 committed Dec 18, 2023
1 parent b64a12f commit ab89a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion precise-side-effects/src/Control/Exception/Ex.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ instance (n :< as, ns :<< as) => (n ': ns) :<< as
type (:-) :: [Type] -> Type -> [Type]
type family a :- b where
'[] :- _ = '[]
(Ex _ ': _) :- _ = TypeError ('Text "Invalid usage of ‘Ex’ in lhs of type family ‘:-’")
_ :- SomeException = '[]
(Ex _ ': _) :- _ = TypeError ('Text "Invalid usage of ‘Ex’ in lhs of type family ‘:-’")
xs :- (Ex exceptions) = xs :-- exceptions
(r ': xs) :- r = xs :- r
(x ': xs) :- r = x ': (xs :- r)
Expand Down

0 comments on commit ab89a0a

Please sign in to comment.