1module Reporting.Task where
3import Control.Monad.Except (Except, ExceptT, runExcept, runExceptT, throwError, withExceptT)
4import qualified Control.Monad.State as State
6import qualified Reporting.Annotation as A
7import qualified Reporting.Region as R
12type Task warning error result =
13 ExceptT [A.Located error] (State.State [A.Located warning]) result
18run :: Task w e a -> (Either [A.Located e] a, [A.Located w])
20 State.runState (runExceptT task) []
25addWarnings :: [A.Located w] -> Task w e ()
27 State.modify (warnings++)
32throw :: R.Region -> e -> Task w e a
34 throwError [A.A region err]
37mapError :: (e -> e') -> Task w e a -> Task w e' a
39 withExceptT (map (A.map f)) task
42from :: (e -> e') -> Except [A.Located e] a -> Task w e' a
44 case runExcept except of
49 throwError (map (A.map f) errors)
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