[darcs-devel] [patch2166] cleaning up Arbitrary instances

Ben Franksen bugs at darcs.net
Thu Jun 3 11:56:24 UTC 2021


Ben Franksen <ben.franksen at online.de> added the comment:

All accepted, details below.

>   * introduce ArbitraryS2

OK

>   * introduce ArbitraryWS

OK

>   * get rid of makeS2Gen

OK

>   * get rid of a bunch of ArbitraryS2 instances

Ok. Adding arbitraryWSThing is clever.

>   * get rid of arbitraryTriple

OK

>   * replace ArbitraryS2 instance with ArbitraryWS

OK

>   * introduce Triple to reduce the random instance overlaps

OK, though it's not yet clear at this point if this addition amortizes.
Also, you previously removed arbitraryTriple by generalizing the
instance ArbitraryState (p :> p) to ArbitraryState (p :> q) which looks
like a move in the opposite direction.

>   * introduce Pair

OK. Same remark as above applies here. BTW, it is not easy to guess
where the Pair type is defined (it's in D.T.P.WithState). A slightly
longer comment explaining the where and how would have made sense here.

>   * introduce ArbitraryWSPair

OK

>   * get rid of some Arbitrary instances

OK

>   * stop testing the internals of Prim.commute

See (accepted) patch2165.

>   * introduce V1Gen wrapper to replace some ArbitraryS2 instances

This is followed up on in patch2167, OK for now.

>   * restructure ArbitraryWSPair

OK

>   * generalise the NamedPrim instances for ArbitraryWS[Pair]

OK

>   * merge ArbitraryWSPair into ArbitraryState

OK (good idea!)

>   * change aPrim/aPrimPair to return Sealed

OK

>   * inline the ArbitraryState instance for Pair

OK

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch2166>
__________________________________


More information about the darcs-devel mailing list