You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the sum-types branch (#1602), it is not currently possible to randomly test expressions involving enums, e.g.,
enum T = MkT
f : T -> Bool
f _ = True
Main> :check f
cryptol: src/Cryptol/Testing/Random.hs:(169,7)-(172,37): Non-exhaustive patterns in case
At a minimum, we should make Cryptol produce a proper error message here. We should also consider implementing random testing support for enums like we do for other types. We'll need to think carefully about what distribution of constructors is desirable. For instance, if we have:
enum Maybe a
= Nothing
| Just a
Then it is arguably more desirable to generate more Just values than Nothing values. Perhaps there is a simple way to encode this metric in the enum distribution that we use.
The text was updated successfully, but these errors were encountered:
On the
sum-types
branch (#1602), it is not currently possible to randomly test expressions involving enums, e.g.,At a minimum, we should make Cryptol produce a proper error message here. We should also consider implementing random testing support for enums like we do for other types. We'll need to think carefully about what distribution of constructors is desirable. For instance, if we have:
Then it is arguably more desirable to generate more
Just
values thanNothing
values. Perhaps there is a simple way to encode this metric in the enum distribution that we use.The text was updated successfully, but these errors were encountered: