Provide a better Show instance for NotEmpty
--HG--
extra : convert_revision : ab40b0006f26c23bafd53dcb89ef32c1524b6b92
commit9fcc9f9bdb04ba3db8ffc68518c58d61273892aa
authorBryan O'Sullivan <bos@serpentine.com>
dateFri 23 Jul 2010, 20:06 (16 years ago)
parentc40b8ab
tests/QuickCheckUtils.hs+4−1
@@ -49,7 +49,10 @@ instance Arbitrary TL.Text where
4949 arbitrary = TL.pack `fmap` arbitrary
5050
5151newtype NotEmpty a = NotEmpty { notEmpty :: a }
52− deriving (Eq, Ord, Show)
52+ deriving (Eq, Ord)
53+
54+instance Show a => Show (NotEmpty a) where
55+ show (NotEmpty a) = show a
5356
5457instance Functor NotEmpty where
5558 fmap f (NotEmpty a) = NotEmpty (f a)