Toxaris / pts

Interpreter for functional pure type systems.
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Arguments of keyword must show up in keywords #129

Closed Blaisorblade closed 9 years ago

Blaisorblade commented 9 years ago

It seems there's an invariant (the argument of keyword must show up in keywords) which is not enforced. Let's enforce that dynamically by calling error on violations: this is triggered during tests often enough (for each keyword call which is covered, but coverage seems good enough), so violations are triggered before deployment often enough.

The runtime overhead is not noticeable, since parsing time is overall minimal.

See violation of this in: https://github.com/Blaisorblade/pts/commit/b73eb5c1fdc6fab1e11b6349aee2471fd133266f#commitcomment-7509176

Also fix another violation which remained here: _( was not a keyword, and this was detected during testing.