We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
genString
1 parent c4158c1 commit 3c84498Copy full SHA for 3c84498
src/Data/String/Gen.purs
@@ -10,7 +10,7 @@ import Data.String as S
10
-- | Generates a string using the specified character generator.
11
genString :: forall m. MonadRec m => MonadGen m => m Char -> m String
12
genString genChar = sized \size -> do
13
- newSize <- chooseInt 1 size
+ newSize <- chooseInt 1 (max 1 size)
14
resize (const newSize) $ S.fromCharArray <$> unfoldable genChar
15
16
-- | Generates a string using characters from the Unicode basic multilingual
0 commit comments