We use the same type EvalError for bugs in the Haskell implementation of Klister and for bugs in the user's .kl code. It would probably make more sense to separate them, for example by making the implementation's bug print "the impossible happened, please report this as a bug", or just calling error :: string -> a to make it clear that they should never happen.
Currently, EvalError contains a mix of both kinds of errors:
We use the same type
EvalError
for bugs in the Haskell implementation of Klister and for bugs in the user's.kl
code. It would probably make more sense to separate them, for example by making the implementation's bug print "the impossible happened, please report this as a bug", or just callingerror :: string -> a
to make it clear that they should never happen.Currently,
EvalError
contains a mix of both kinds of errors:EvalErrorUnbound
: impossibleEvalErrorType
: impossibleEvalErrorCase
: user error, e.g.(case (nil))
EvalErrorUser
: user error, e.g.(error '"oops")
EvalErrorIdent
: impossible