-
Notifications
You must be signed in to change notification settings - Fork 66
Diagnostics, Error Reporting
frenchy64 edited this page Aug 22, 2011
·
3 revisions
Potentially lots of useful information can be given with a fail node.
Simple pattern comprehensiveness warnings can be given, for example
(match [x]
[1] 1)
This pattern matrix can fall through.
Might give warning:
Warning: Non-comprehensive pattern matrix
Done
If a fail node is reached, could report on how the match got to that point.
(let [x 1
y 2
z 3]
(match [x y z]
[1 3 3] 1))
Could give error:
No match found: No match for {y 3}, successful matches: {x 1, z 3}
Decent messages for Seq patterns that are gensymed will be more challenging.
Some useful information to report:
- Number of branches tested at runtime (how many
cond
s executed) - Number of SwitchNodes created at compile time
- Number of LeafNodes created at compile time (?)
- Execution trace of Matrix->DAG compilation
It would be useful to show the origin of the expanded occurances in error messages.
This would make following long lists easier, for example.