mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Define the arbitrary instances for Row and Line in terms of an Arbitrary type a.
This commit is contained in:
parent
3424df075a
commit
c9f13f2f41
@ -12,7 +12,7 @@ import Control.Monad.Free hiding (unfold)
|
||||
import Patch
|
||||
import Syntax
|
||||
|
||||
instance Arbitrary (Row a) where
|
||||
instance Arbitrary a => Arbitrary (Row a) where
|
||||
arbitrary = oneof [
|
||||
Row <$> arbitrary <*> arbitrary ]
|
||||
|
||||
@ -22,7 +22,7 @@ instance Arbitrary HTML where
|
||||
Span <$> arbitrary <*> arbitrary,
|
||||
const Break <$> (arbitrary :: Gen ()) ]
|
||||
|
||||
instance Arbitrary (Line a) where
|
||||
instance Arbitrary a => Arbitrary (Line a) where
|
||||
arbitrary = oneof [
|
||||
Line <$> arbitrary <*> arbitrary,
|
||||
const EmptyLine <$> (arbitrary :: Gen ()) ]
|
||||
|
Loading…
Reference in New Issue
Block a user