1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Add an ArbitrarySyntax type.

This commit is contained in:
Rob Rix 2015-12-11 00:32:46 -05:00
parent a71a4d2e36
commit c7dbd6e79b

View File

@ -16,6 +16,9 @@ import Test.QuickCheck
newtype ArbitraryTerm = ArbitraryTerm (Term String ())
deriving (Show, Eq)
newtype ArbitrarySyntax a f = ArbitrarySyntax (Syntax a f)
deriving (Show, Eq)
instance Arbitrary ArbitraryTerm where
arbitrary = oneof [ ArbitraryTerm . (() :<) . Leaf <$> arbitrary ]