Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data DebuggableScript
- checkedCompileD :: forall (a :: S -> Type). (forall (s :: S). Term s a) -> Either Text DebuggableScript
- mustCompileD :: forall (a :: S -> Type). (forall (s :: S). Term s a) -> DebuggableScript
- applyScript :: Script -> Script -> Script
- applyDebuggableScript :: DebuggableScript -> [Data] -> DebuggableScript
- applyDebuggableArg :: DebuggableScript -> DebuggableScript -> DebuggableScript
- mustFinalEvalDebuggableScript :: DebuggableScript -> Script
- finalEvalDebuggableScript :: DebuggableScript -> (Either EvalError Script, ExBudget, [Text])
- mustEvalScript :: Script -> Script
- mustEvalD :: DebuggableScript -> DebuggableScript
Type
data DebuggableScript Source #
A Script
with a debug fallback that has tracing turned on.
Since: 3.8.0
Instances
Construction
checkedCompileD :: forall (a :: S -> Type). (forall (s :: S). Term s a) -> Either Text DebuggableScript Source #
For handling compilation errors right away.
You pay for the compilation of the debug script, even if it's not needed down
the line. You most likely want mustCompileD
instead.
Since: 3.0.2
mustCompileD :: forall (a :: S -> Type). (forall (s :: S). Term s a) -> DebuggableScript Source #
Compilation errors cause exceptions, but deferred by lazyness.
You don't pay for compilation of the debug script if it's not needed!
Since: 3.0.2
Use
applyScript :: Script -> Script -> Script Source #
Apply a function to an argument on the compiled Script
level.
Since: 3.8.0
applyDebuggableScript :: DebuggableScript -> [Data] -> DebuggableScript Source #
Apply given arguments to DebuggableScript
.
Since: 3.7.1
applyDebuggableArg :: DebuggableScript -> DebuggableScript -> DebuggableScript Source #
Apply a single argument, provided as a DebuggableScript
.
Since: 3.8.0
mustFinalEvalDebuggableScript :: DebuggableScript -> Script Source #
Final evaluation of a DebuggableScript
to a Script
, with errors resulting in
exceptions.
Since: 3.0.2
finalEvalDebuggableScript :: DebuggableScript -> (Either EvalError Script, ExBudget, [Text]) Source #
Final evaluation of a DebuggableScript
, with full evalScript
result.
Falls back to the debug script if a UserEvaluationError
occurs. Verifies that
the debug script results in a UserEvaluationError
too, throws an exception
otherwise.
Since: 3.0.2
mustEvalScript :: Script -> Script Source #
mustEvalD :: DebuggableScript -> DebuggableScript Source #
Evaluate a DebuggableScript
to a DebuggableScript
, with errors
resulting in exceptions.
This is mostly useful for pre-evaluating arguments to a thing being tested/benchmarked. Lazyness defers the evaluation (and exception) until it's needed, so the debug script causes no unneccessary work.
Since: 3.0.2