diff options
Diffstat (limited to 'stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux')
-rw-r--r-- | stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux index 3403461fb..8799f8b57 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/analysis/coverage.lux @@ -7,7 +7,7 @@ [control ["[0]" maybe (.use "[1]#[0]" monoid monad)] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)]] + ["[0]" exception (.only Exception)]] [data ["[0]" bit (.use "[1]#[0]" equivalence)] ["[0]" text (.only) @@ -158,7 +158,8 @@ {#Exhaustive} "*")) -(exception .public (invalid_tuple [size Nat]) +(exception.def .public (invalid_tuple size) + (Exception Nat) (exception.report (list ["Expected size" ">= 2"] ["Actual size" (%.nat size)]))) @@ -235,14 +236,14 @@ ... always be a pattern prior to them that would match the input. ... Because of that, the presence of redundant patterns is assumed to ... be a bug, likely due to programmer carelessness. -(exception .public (redundancy [so_far Coverage - addition Coverage]) +(exception.def .public (redundancy [so_far addition]) + (Exception [Coverage Coverage]) (exception.report (list ["Coverage so-far" (format so_far)] ["Additional coverage" (format addition)]))) -(exception .public (variant_mismatch [expected Nat - mismatched Nat]) +(exception.def .public (variant_mismatch [expected mismatched]) + (Exception [Nat Nat]) (exception.report (list ["Expected cases" (%.nat expected)] ["Mismatched cases" (%.nat mismatched)]))) |