1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

Generate arbitrary p,q-grams.

This commit is contained in:
Rob Rix 2016-06-22 10:54:48 -04:00
parent b85e2f27ce
commit 1d848e6dc3

View File

@ -5,5 +5,8 @@ import Data.Gram
import Prologue
import Test.QuickCheck
gramWithPQ :: Arbitrary label => Int -> Int -> Gen (Gram label)
gramWithPQ p q = Gram <$> vectorOf p arbitrary <*> vectorOf q arbitrary
instance Arbitrary label => Arbitrary (Gram label) where
arbitrary = Gram <$> arbitrary <*> arbitrary