[darcs-devel] [patch2166] cleaning up Arbitrary instances
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
> * introduce ArbitraryWS
> * get rid of makeS2Gen
> * get rid of a bunch of ArbitraryS2 instances
Ok. Adding arbitraryWSThing is clever.
> * get rid of arbitraryTriple
> * replace ArbitraryS2 instance with ArbitraryWS
> * 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
> * get rid of some Arbitrary instances
> * 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
> * generalise the NamedPrim instances for ArbitraryWS[Pair]
> * merge ArbitraryWSPair into ArbitraryState
OK (good idea!)
> * change aPrim/aPrimPair to return Sealed
> * inline the ArbitraryState instance for Pair
Darcs bug tracker <bugs at darcs.net>
More information about the darcs-devel