on master help sign in
Handler for Exceptions in List context
commit202937d1ea822314fc5bf3c23e0aea994d276d8a authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 6 Mar 2014, 16:24 (13 years ago) parentdc196bf
1 file changed+3
libs/neweffects/Effect/Exception.idr+3
libs/neweffects/Effect/Exception.idr+3
@@ -10,6 +10,9 @@ data Exception : Type -> Effect where
1010instance Handler (Exception a) Maybe where
1111 handle _ (Raise e) k = Nothing
1212
13+instance Handler (Exception a) List where
14+ handle _ (Raise e) k = []
15+
1316instance Show a => Handler (Exception a) IO where
1417 handle _ (Raise e) k = do print e
1518 believe_me (exit 1)