mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Data.These has its own Arbitrary instance these days.
This commit is contained in:
parent
9f93b1090c
commit
2e28d0d582
@ -24,7 +24,6 @@ library
|
||||
, Data.Record
|
||||
, Data.Mergeable
|
||||
, Data.Mergeable.Generic
|
||||
, Data.These.Arbitrary
|
||||
, Diff
|
||||
, Diff.Arbitrary
|
||||
, Diffing
|
||||
|
@ -4,7 +4,6 @@ module Data.Bifunctor.Join.Arbitrary where
|
||||
import Data.Bifunctor.Join
|
||||
import Data.Functor.Both as Both
|
||||
import Data.These
|
||||
import Data.These.Arbitrary ()
|
||||
import Prologue
|
||||
import Test.QuickCheck
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Data.These.Arbitrary where
|
||||
|
||||
import Data.These
|
||||
import Prologue
|
||||
import Test.QuickCheck
|
||||
|
||||
instance (Arbitrary a, Arbitrary b) => Arbitrary (These a b) where
|
||||
arbitrary = oneof [ This <$> arbitrary
|
||||
, That <$> arbitrary
|
||||
, These <$> arbitrary <*> arbitrary ]
|
||||
shrink = these (fmap This . shrink) (fmap That . shrink) (\ a b -> (This <$> shrink a) ++ (That <$> shrink b) ++ (These <$> shrink a <*> shrink b))
|
Loading…
Reference in New Issue
Block a user