Hi all,
Is there a way, with doctest and quickcheck, to declare test at typeclass level (such as laws) and play them automatically at instance level?
For example:
-- | Convert from/to a List to/from an arbitrary data structure
--
-- >>> prop > fromList . toList == id
class Listable d where
fromList :: [a] -> d a
toList :: d a -> [a]
And this test will be played for each instance.
Thanks in advance for your help.