on master help sign in
Handler for Exceptions in List context
202937dEdwin Brady
libs/neweffects/Effect/Exception.idr+3
@@ -10,6 +10,9 @@ data Exception : Type -> Effect where
10instance Handler (Exception a) Maybe where
10instance Handler (Exception a) Maybe where
11 handle _ (Raise e) k = Nothing
11 handle _ (Raise e) k = Nothing
12
12
13+instance Handler (Exception a) List where
14+ handle _ (Raise e) k = []
15+
13instance Show a => Handler (Exception a) IO where
16instance Show a => Handler (Exception a) IO where
14 handle _ (Raise e) k = do print e
17 handle _ (Raise e) k = do print e
15 believe_me (exit 1)
18 believe_me (exit 1)