1------------------------------------------------------------------------------
2-- CPP macros for common instances
3------------------------------------------------------------------------------
5-- XXX use template haskell instead and include Monoid and IsStream instances
8#define MONADPARALLEL , MonadAsync m
10#define MONAD_APPLICATIVE_INSTANCE(STREAM,CONSTRAINT) \
11instance (Monad m CONSTRAINT) => Applicative (STREAM m) where { \
12 pure = STREAM . K.yield; \
15#define MONAD_COMMON_INSTANCES(STREAM,CONSTRAINT) \
16instance Monad m => Functor (STREAM m) where { \
19instance (MonadBase b m, Monad m CONSTRAINT) => MonadBase b (STREAM m) where {\
20 liftBase = liftBaseDefault }; \
22instance (MonadIO m CONSTRAINT) => MonadIO (STREAM m) where { \
23 liftIO = lift . liftIO }; \
25instance (MonadThrow m CONSTRAINT) => MonadThrow (STREAM m) where { \
26 throwM = lift . throwM }; \
29instance (MonadError e m CONSTRAINT) => MonadError e (STREAM m) where { \
30 throwError = lift . throwError; \
32 fromStream $ withCatchError (toStream m) (\e -> toStream $ h e) }; \
35instance (MonadReader r m CONSTRAINT) => MonadReader r (STREAM m) where { \
37 local f m = fromStream $ K.withLocal f (toStream m) }; \
39instance (MonadState s m CONSTRAINT) => MonadState s (STREAM m) where { \
41 put x = lift (put x); \
42 state k = lift (state k) }
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