mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
e1d94f07d1
This was created with a whole mess of Leancheck combinators. A Hedgehog approach makes things easier.
13 lines
332 B
Haskell
13 lines
332 B
Haskell
{-# LANGUAGE TypeFamilies #-}
|
|
module Generators
|
|
( source
|
|
) where
|
|
|
|
import Hedgehog
|
|
import qualified Hedgehog.Gen as Gen
|
|
import qualified Data.Source
|
|
import Data.Functor.Identity
|
|
|
|
source :: (GenBase m ~ Identity, MonadGen m) => Hedgehog.Range Int -> m Data.Source.Source
|
|
source r = Data.Source.fromUTF8 <$> Gen.utf8 r Gen.unicode
|