@@ -131,7 +131,8 @@ data IState = IState {
131131 idris_outputmode :: OutputMode,
132132 idris_colourRepl :: Bool,
133133 idris_colourTheme :: ColourTheme,
134− idris_outh :: Handle
134+ idris_outh :: Handle,
135+ idris_errorhandlers :: [Name]
135136 }
136137
137138data SizeChange = Smaller | Same | Bigger | Unknown
@@ -189,13 +190,15 @@ data IBCWrite = IBCFix FixDecl
189190 | IBCLineApp FilePath Int PTerm
190191 deriving Show
191192
193+-- | The initial state for the compiler
194+idrisInit :: IState
192195idrisInit = IState initContext [] [] emptyContext emptyContext emptyContext
193196 emptyContext emptyContext emptyContext emptyContext
194197 emptyContext emptyContext emptyContext emptyContext
195198 emptyContext
196199 [] [] defaultOpts 6 [] [] [] [] [] [] [] [] [] [] [] []
197200 [] Nothing Nothing [] [] [] Hidden False [] Nothing [] [] RawOutput
198− True defaultTheme stdout
201+ True defaultTheme stdout []
199202
200203-- | The monad for the main REPL - reading and processing files and updating
201204-- global state (hence the IO inner monad).
@@ -380,6 +383,7 @@ data FnOpt = Inlinable -- always evaluate when simplifying
380383 -- a function argument, and further evaluation resutls
381384 | Implicit -- implicit coercion
382385 | CExport String -- export, with a C name
386+ | ErrorHandler -- ^^ an error handler for use with the ErrorReflection extension
383387 | Reflection -- a reflecting function, compile-time only
384388 | Specialise [(Name, Maybe Int)] -- specialise it, freeze these names
385389 deriving (Show, Eq)