@@ -2658,9 +2658,11 @@ withErrorReflection x = idrisCatch x (\ e -> handle e >>= ierror)
26582658 concat (intersperse ", " (map show handlers))
26592659 let reports = map (\n -> RApp (Var n) (reflectErr err)) handlers
26602660
2661− -- Typecheck error handlers - if this fails, then something else was wrong earlier!
2661+ -- Typecheck error handlers - if this fails, most
2662+ -- likely something which is needed by it has not
2663+ -- been imported, so keep the original error.
26622664 handlers <- case mapM (check (tt_ctxt ist) []) reports of
2663− Error e -> ierror $ ReflectionFailed "Type error while constructing reflected error" e
2665+ Error _ -> return [] -- ierror $ ReflectionFailed "Type error while constructing reflected error" e
26642666 OK hs -> return hs
26652667
26662668 -- Normalize error handler terms to produce the new messages