1module Idris.Error where
10import Control.Monad.State
15iucheck = do tit <- typeInType
18 idrisCatch (tclift $ ucheck (idris_constraints ist))
19 (\e -> do let msg = report e
20 setErrLine (getErrLine msg)
23report :: IOError -> String
25 | isUserError e = ioeGetErrorString e
28-- Taken from the library source code - for ghc 6.12/7 compatibility
29liftCatch :: (m (a,s) -> (e -> m (a,s)) -> m (a,s)) ->
30 StateT s m a -> (e -> StateT s m a) -> StateT s m a
31liftCatch catchError m h =
32 StateT $ \s -> runStateT m s `catchError` \e -> runStateT (h e) s
34idrisCatch :: Idris a -> (IOError -> Idris a) -> Idris a
35idrisCatch op handler = liftCatch catch op handler
37tclift :: Show a => TC a -> Idris a
40 Error err -> do i <- get
42 At (FC f l) e -> setErrLine l
47 = case span (/=':') str of
48 (_, ':':rest) -> case span isDigit rest of
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