@@ -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
@@ -188,13 +189,15 @@ data IBCWrite = IBCFix FixDecl
188189 | IBCLineApp FilePath Int PTerm
189190 deriving Show
190191
192+-- | The initial state for the compiler
193+idrisInit :: IState
191194idrisInit = IState initContext [] [] emptyContext emptyContext emptyContext
192195 emptyContext emptyContext emptyContext emptyContext
193196 emptyContext emptyContext emptyContext emptyContext
194197 emptyContext
195198 [] [] defaultOpts 6 [] [] [] [] [] [] [] [] [] [] [] []
196199 [] Nothing Nothing [] [] [] Hidden False [] Nothing [] [] RawOutput
197− True defaultTheme stdout
200+ True defaultTheme stdout []
198201
199202-- | The monad for the main REPL - reading and processing files and updating
200203-- global state (hence the IO inner monad).
@@ -379,6 +382,7 @@ data FnOpt = Inlinable -- always evaluate when simplifying
379382 -- a function argument, and further evaluation resutls
380383 | Implicit -- implicit coercion
381384 | CExport String -- export, with a C name
385+ | ErrorHandler -- ^^ an error handler for use with the ErrorReflection extension
382386 | Reflection -- a reflecting function, compile-time only
383387 | Specialise [(Name, Maybe Int)] -- specialise it, freeze these names
384388 deriving (Show, Eq)