1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

arbitraryLeaf produces a Source.

This commit is contained in:
Rob Rix 2015-12-23 22:27:48 -05:00
parent 5e8e9bda5f
commit f1ab391423

View File

@ -28,7 +28,7 @@ instance Arbitrary a => Arbitrary (Line a) where
instance Arbitrary a => Arbitrary (Source a) where
arbitrary = makeSource <$> arbitrary
arbitraryLeaf :: Gen (String, Info, Syntax String f)
arbitraryLeaf :: Gen (Source Char, Info, Syntax (Source Char) f)
arbitraryLeaf = toTuple <$> arbitrary
where toTuple string = (string, Info (Range 0 $ length string) mempty, Leaf string)