mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
arbitraryLeaf
doesn’t construct terms.
This commit is contained in:
parent
aaaf8f27a4
commit
0422098f9b
@ -29,9 +29,9 @@ instance Arbitrary a => Arbitrary (Line a) where
|
||||
Line <$> arbitrary,
|
||||
const EmptyLine <$> (arbitrary :: Gen ()) ]
|
||||
|
||||
arbitraryLeaf :: Int -> (Info -> Syntax String f -> f) -> Gen (String, f)
|
||||
arbitraryLeaf start f = pairWithLeaf <$> arbitrary
|
||||
where pairWithLeaf string = (string, f (Info (Range start $ start + length string) mempty) (Leaf string))
|
||||
arbitraryLeaf :: Int -> Gen (String, Info, Syntax String f)
|
||||
arbitraryLeaf start = pairWithLeaf <$> arbitrary
|
||||
where pairWithLeaf string = (string, Info (Range start $ start + length string) mempty, Leaf string)
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
|
Loading…
Reference in New Issue
Block a user