@@ -128,7 +128,8 @@ data IState = IState {
128128 idris_outputmode :: OutputMode,
129129 idris_colourRepl :: Bool,
130130 idris_colourTheme :: ColourTheme,
131− idris_outh :: Handle
131+ idris_outh :: Handle,
132+ idris_errorhandlers :: [Name]
132133 }
133134
134135data SizeChange = Smaller | Same | Bigger | Unknown
@@ -182,12 +183,14 @@ data IBCWrite = IBCFix FixDecl
182183 | IBCLineApp FilePath Int PTerm
183184 deriving Show
184185
186+-- | The initial state for the compiler
187+idrisInit :: IState
185188idrisInit = IState initContext [] [] emptyContext emptyContext emptyContext
186189 emptyContext emptyContext emptyContext emptyContext
187190 emptyContext emptyContext emptyContext emptyContext
188191 [] "" defaultOpts 6 [] [] [] [] [] [] [] [] [] [] [] []
189192 [] Nothing Nothing [] [] [] Hidden False [] Nothing [] [] RawOutput
190− True defaultTheme stdout
193+ True defaultTheme stdout []
191194
192195-- | The monad for the main REPL - reading and processing files and updating
193196-- global state (hence the IO inner monad).
@@ -368,6 +371,7 @@ data FnOpt = Inlinable -- always evaluate when simplifying
368371 -- a function argument, and further evaluation resutls
369372 | Implicit -- implicit coercion
370373 | CExport String -- export, with a C name
374+ | ErrorHandler -- ^^ an error handler for use with the ErrorReflection extension
371375 | Reflection -- a reflecting function, compile-time only
372376 | Specialise [(Name, Maybe Int)] -- specialise it, freeze these names
373377 deriving (Show, Eq)