1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 05:27:08 +03:00
semantic/test/Data/Adjoined/Spec.hs
2016-03-11 09:13:39 -05:00

20 lines
481 B
Haskell

module Data.Adjoined.Spec where
import Data.Adjoined
import Data.Coalescent
import Test.QuickCheck
instance Arbitrary a => Arbitrary (Adjoined a) where
arbitrary = fromList <$> arbitrary
-- | A wrapper which never coalesces values.
newtype Separated a = Separated { unSeparated :: a }
deriving (Eq, Functor, Show)
instance Arbitrary a => Arbitrary (Separated a) where
arbitrary = Separated <$> arbitrary
instance Coalescent (Separated a) where
coalesce _ _ = Nothing