[Haskell-cafe] Monad transformer responsibilities

Henning Thielemann lemming at henning-thielemann.de
Sun Jun 7 16:42:22 EDT 2009


Stephan Friedrichs schrieb:
> Hi,
> 
> it's alomost the same problem when you're writing a library with
> optional quickcheck test cases: Where to put the Arbitrary instances?
> 
>  - You can't put them into quickcheck
>  - You don't want to put them in the library (because of the quickcheck
>    dependency)

... and because there are two incompatible QuickCheck versions.

>  - So you have to declare them near the test cases and they're orphan
>    instances
> 
> The entire project doesn't issue a single warning when compiling with
> -Wall *except* two orphan instances when building the test cases...

However, I had sometimes the case, where a type from another library was
part of my tests and thus I needed its Arbitrary instance. I could have
defined instances for the foreign types, but they would have been orphan
and I risk that the library author decides to add the instances later.


More information about the Haskell-Cafe mailing list