1{-# LANGUAGE DeriveDataTypeable #-}
3module Idris.Error where
5import Prelude hiding (catch)
11import Core.Constraints
13import System.Console.Haskeline
14import Control.Monad.State
15import System.IO.Error(isUserError, ioeGetErrorString)
20iucheck = do tit <- typeInType
23 idrisCatch (tclift $ ucheck (idris_constraints ist))
24 (\e -> do let msg = show e
25 setErrLine (getErrLine msg)
28report :: IOError -> String
30 | isUserError e = ioeGetErrorString e
33idrisCatch :: Idris a -> (SomeException -> Idris a) -> Idris a
36data IdrisErr = IErr String
39instance Show IdrisErr where
42instance Exception IdrisErr
44ifail :: String -> Idris ()
45ifail str = throwIO (IErr str)
47tclift :: TC a -> Idris a
50 Error err -> do i <- get
52 At (FC f l) e -> setErrLine l
54 throwIO (IErr $ pshow i err)
57 = case span (/=':') str of
58 (_, ':':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