Errors #
Cvc.Error is what every failing operation of this library throws, Res/ResT the result types
carrying one, and throwUser and friends the ways to throw one.
The error type of this library.
- internal
(msg : String)
: Error
A failure inside this library.
- unsupported
(msg : String)
: Error
Unsupported feature.
- user
(msg : String)
: Error
A misuse of the library or of cvc5, including every error cvc5 reports.
- io
(msg : String)
: Error
Input/output error.
Instances For
Equations
- Cvc.instInhabitedError = { default := Cvc.instInhabitedError.default }
Maps over an error's message.
Equations
- Cvc.Error.mapMsg f (Cvc.Error.internal msg) = Cvc.Error.internal (f msg)
- Cvc.Error.mapMsg f (Cvc.Error.unsupported msg) = Cvc.Error.unsupported (f msg)
- Cvc.Error.mapMsg f (Cvc.Error.user msg) = Cvc.Error.user (f msg)
- Cvc.Error.mapMsg f (Cvc.Error.io msg) = Cvc.Error.io (f msg)
Instances For
String representation.
Equations
Instances For
Equations
- Cvc.Error.instToString = { toString := Cvc.Error.toString }
Throws an Error.user.
Equations
- Cvc.throwUser msg = throw (Cvc.Error.user msg)
Instances For
Unwraps an Option, throwing an Error.user on none.
Equations
- Cvc.someOrThrowUser msg (some a) = pure a
- Cvc.someOrThrowUser msg none = Cvc.throwUser msg
Instances For
Throws an Error.internal.
Equations
- Cvc.throwInternal msg = throw (Cvc.Error.internal msg)
Instances For
Throws an Error.internal with an unsupported-feature message.
Equations
- Cvc.throwTodo msg = throw (Cvc.Error.internal (toString "[unsupported] " ++ toString msg))
Instances For
Throws an Error.internal reporting that unreachable code was reached.
Equations
Instances For
Throws an Error.io.
Equations
- Cvc.throwIO e = throw (Cvc.Error.io (toString e))
Instances For
code, failing with the user error explain gives, if it gives one, when code fails.
Equations
Instances For
Sets an error context as a lazy string to newline-append after code's error, if any.