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
{{ message }}
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
This replaces the test.Gen ability with a more direct encoding. Rather than going through Weighted (which has very poor asymptotics), this ability uses Stream:
ability Gen where
generate : '{Stream (Either Nat a)} () ->{Gen} a
The convention is that a Nat emitted on the Left of the stream is a weight for the remainder of the stream. So in effect, the weight of any given element of the stream is the sum of all the weights that have been emitted before it.
Semantically equivalent to Weighted, with the exception that weights can be zero. This difference may slightly change the generated order of some existing generators after migrating to this new type.
This replaces the
test.Gen
ability with a more direct encoding. Rather than going throughWeighted
(which has very poor asymptotics), this ability usesStream
:The convention is that a
Nat
emitted on theLeft
of the stream is a weight for the remainder of the stream. So in effect, the weight of any given element of the stream is the sum of all the weights that have been emitted before it.Semantically equivalent to
Weighted
, with the exception that weights can be zero. This difference may slightly change the generated order of some existing generators after migrating to this new type.Fixes #58 and #45
Included term and type replacements in
patch
to automatically migrate existing tests.Code review
The changes summarized below are available for you to review, using the
following command:
Updates:
Added definitions:
The text was updated successfully, but these errors were encountered: