File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,10 +18,6 @@ import Prettyprinter
1818import Prettyprinter.Render.Text
1919import qualified Text.PrettyPrint.ANSI.Leijen as WL
2020
21- #if !(APPLICATIVE_MONAD)
22- import Control.Applicative
23- #endif
24-
2521
2622
2723main :: IO ()
@@ -47,12 +43,14 @@ benchOptimize = env randomShortWords benchmark_
4743 randomShortWords' :: Int -> State StdGen [Text ]
4844 randomShortWords' n = replicateM n randomShortWord
4945
46+ -- Note: 'split' is deprecated in random >= 1.2 in favor of 'splitGen'.
47+ -- We could use 'splitGen' when support for GHC < 9.0 is dropped.
5048 randomShortWord :: State StdGen Text
5149 randomShortWord = do
5250 g <- get
5351 let (l, g') = randomR (0 , 5 ) g
5452 (gNew, gFree) = split g'
55- xs = take l (randoms gFree)
53+ xs = take l (randoms gFree :: [ Char ] )
5654 put gNew
5755 pure (T. pack xs)
5856
You can’t perform that action at this time.
0 commit comments