1module Control.Catchable
5class Catchable (m : Type -> Type) t where
7 catch : m a -> (t -> m a) -> m a
9instance Catchable Maybe () where
10 catch Nothing h = h ()
11 catch (Just x) h = Just x
15instance Catchable (Either a) a where
16 catch (Left err) h = h err
17 catch (Right x) h = (Right x)
21instance Catchable (IOExcept err) err where
22 catch (ioM prog) h = ioM (do p' <- prog
24 Left e => let ioM he = h e in he
25 Right val => return (Right val))
26 throw x = ioM (return (Left x))
28instance Catchable List () where
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list