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:
parent
b85e2f27ce
commit
1d848e6dc3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user