From ab89a0af6b9509221333fc77f62961e53e27708b Mon Sep 17 00:00:00 2001 From: Jens Nolte Date: Mon, 18 Dec 2023 22:33:32 +0100 Subject: [PATCH] precise-side-effects: Increase SomeException handling priority for `:-` Allows SomeException to work with an unknown/open exception list. --- precise-side-effects/src/Control/Exception/Ex.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/precise-side-effects/src/Control/Exception/Ex.hs b/precise-side-effects/src/Control/Exception/Ex.hs index e52b537..180d272 100644 --- a/precise-side-effects/src/Control/Exception/Ex.hs +++ b/precise-side-effects/src/Control/Exception/Ex.hs @@ -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)