Qi Xiao
4776c16b2f
Add more test for special forms.
...
Plus some minor test-related changes.
2021-06-20 18:18:45 +01:00
Qi Xiao
91b6f6dd72
Use the integrated persistent package.
2021-05-03 22:17:46 +01:00
Qi Xiao
196eea21d4
Change module import path to src.elv.sh
2021-01-27 01:30:25 +00:00
Qi Xiao
b77a052e7e
pkg/eval: Make Exception an interface.
...
This change is a preparation step for refining all *Op types to return Exception
as the error.
Keeping Exception as a struct type will make such a change error-prone, since
a (*Exception)(nil) != error(nil), so if an *Op returns a nil *Exception, it
is not nil if the return value is stored in an error-typed variable.
2021-01-08 00:56:45 +00:00
Qi Xiao
72d7c5c595
pkg/eval: Minor godoc edits.
2020-09-04 22:10:47 +01:00
Qi Xiao
9b9a6de2cd
pkg/eval: Cause -> Reason.
2020-09-04 21:04:58 +01:00
Qi Xiao
bb122024dd
pkg/eval: Move test framework into new evaltest package.
2020-09-03 06:51:21 +01:00
Qi Xiao
fca1621294
pkg/eval: Export the StackTrace type.
2020-09-03 05:54:32 +01:00
Qi Xiao
853f00c812
pkg/eval: Fix panic on "show $ok".
...
This fixes #1064 .
2020-07-04 19:08:09 +01:00
Qi Xiao
c5c07bbb81
pkg/eval: Do not crash when showing an exception with nil reason.
...
This fixes #994 .
2020-07-01 21:48:03 +01:00
Qi Xiao
1f562505f3
Rework the API for introspecting exception causes.
...
* Use a "type" field to identify the type, instead of predicates in the exc:
module.
* Make the reason values behave more like structmaps, including a Repr that
mimics a map.
This fixes #208 .
2020-06-30 22:27:07 +01:00
Qi Xiao
7b9f784cd5
pkg/eval: Rename fields of Exception, and expose fields as a pseudomap.
2020-06-29 21:26:10 +01:00
Qi Xiao
c65e970951
pkg/eval: ComposeExceptionsFromPipeline -> makePipelineError.
2020-04-10 01:25:55 +01:00
Qi Xiao
bc25c6fe1a
pkg/eval: Test all Error methods of the error types.
...
Also fix a bug in Flow.Error that results in infinite recursion.
This addresses #944 .
2020-03-31 00:36:55 +01:00
Qi Xiao
c05f11d3dc
[cleanup] pkg/diag: PPrint -> Show.
2020-03-31 00:27:08 +01:00
Qi Xiao
d44363d8cd
[cleanup]: Move pkg/util/pprinter.go to pkg/diag.
2020-03-30 23:48:22 +01:00
Qi Xiao
0d30e926c9
[cleanup] pkg/eval: Simplify ExternalCmdExit to always contain a PID.
2020-03-30 23:38:40 +01:00
Qi Xiao
9d280e9231
[cleanup] pkg/eval: Small stackTrace cleanup.
2020-03-29 14:53:34 +01:00
Qi Xiao
e45fdf7228
Move all libraries to new pkg/.
2019-12-23 20:00:59 +00:00