Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type CompileError uni fun ann = WithContext Text (Error uni fun ann)
- data Error uni fun a
- = PLCError !(Error uni fun a)
- | PIRError !(Error uni fun (Provenance a))
- | CompilationError !Text
- | UnsupportedError !Text
- | FreeVariableError !Text
- | InvalidMarkerError !String
- | CoreNameLookupError !Name
- data WithContext c e
- = NoContext e
- | WithContextC Int c (WithContext c e)
- withContext ∷ MonadError (WithContext c e) m ⇒ Int → c → m a → m a
- withContextM ∷ MonadError (WithContext c e) m ⇒ Int → m c → m a → m a
- throwPlain ∷ MonadError (WithContext c e) m ⇒ e → m a
- pruneContext ∷ Int → WithContext c e → WithContext c e
Documentation
type CompileError uni fun ann = WithContext Text (Error uni fun ann) Source #
PLCError !(Error uni fun a) | |
PIRError !(Error uni fun (Provenance a)) | |
CompilationError !Text | |
UnsupportedError !Text | |
FreeVariableError !Text | |
InvalidMarkerError !String | |
CoreNameLookupError !Name |
Instances
data WithContext c e Source #
An error with some (nested) context. The integer argument to WithContextC
represents
the priority of the context when displaying it. Lower numbers are more prioritised.
NoContext e | |
WithContextC Int c (WithContext c e) |
Instances
withContext ∷ MonadError (WithContext c e) m ⇒ Int → c → m a → m a Source #
withContextM ∷ MonadError (WithContext c e) m ⇒ Int → m c → m a → m a Source #
throwPlain ∷ MonadError (WithContext c e) m ⇒ e → m a Source #
pruneContext ∷ Int → WithContext c e → WithContext c e Source #