mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Compute a Source from a list of children.
This commit is contained in:
parent
aff7fbbc47
commit
2541405fdc
@ -187,6 +187,9 @@ data Child = Child
|
||||
, childMargin :: String
|
||||
}
|
||||
|
||||
toSource :: [Child] -> Source.Source Char
|
||||
toSource = Source.fromList . concatMap show
|
||||
|
||||
instance Arbitrary Child where
|
||||
arbitrary = Child <$> key <*> contents <*> margin
|
||||
where key = listOf1 (elements (['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9']))
|
||||
|
Loading…
Reference in New Issue
Block a user