1{-# LANGUAGE Rank2Types #-}
22 forall result. (a -> IO result) -> (x -> IO result) -> IO result
26run :: Task x a -> IO (Either x a)
28 task (return . Right) (return . Left)
33 Task $ \_ err -> err x
36mapError :: (x -> y) -> Task x a -> Task y a
37mapError func (Task task) =
49 Task $ \ok _ -> work >>= ok
52mio :: x -> IO (Maybe a) -> Task x a
61eio :: (x -> y) -> IO (Either x a) -> Task y a
67 Left x -> err (func x)
74instance Functor (Task x) where
76 fmap func (Task taskA) =
79 okA arg = ok (func arg)
84instance Applicative (Task x) where
90 (<*>) (Task taskFunc) (Task taskArg) =
95 okArg arg = ok (func arg)
102instance Monad (Task x) where
103 {-# INLINE return #-}
107 (>>=) (Task taskA) callback =
112 Task taskB -> taskB ok err
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