1module Prelude.Catchable
8class Catchable (m : Type -> Type) t where
10 catch : m a -> (t -> m a) -> m a
12instance Catchable Maybe () where
13 catch Nothing h = h ()
14 catch (Just x) h = Just x
18instance Catchable (Either a) a where
19 catch (Left err) h = h err
20 catch (Right x) h = (Right x)
24instance Catchable (IOExcept err) err where
25 catch (ioM prog) h = ioM (do p' <- prog
27 Left e => let ioM he = h e in he
28 Right val => return (Right val))
29 throw x = ioM (return (Left x))
31instance 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