Skip to content

Commit

Permalink
Fix build for ghc 9.2 and older
Browse files Browse the repository at this point in the history
They need GADTs or TypeFamilies enabled in a module to solve constraints
arising from other modules.
  • Loading branch information
dcoutts committed Sep 20, 2024
1 parent b7887e9 commit 50a8a63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchmark/Bench.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-} -- Needed for GHC 9.2 and older only
{- HLINT ignore "Use camelCase" -}

module Main (main) where
Expand All @@ -8,6 +9,7 @@ import Data.Primitive
import qualified Data.Set as Set
import Control.Monad
import Control.Monad.Primitive (RealWorld)
import Control.Monad.ST (ST)
import Control.Exception
import Control.Concurrent.Async as Async

Expand Down Expand Up @@ -142,6 +144,7 @@ generateIOOpsBatch !fd !buf !lastBlock !size !rng0 =
go v rng0 0
return v
where
go :: V.MVector s (IOOp IO) -> Random.StdGen -> Int -> ST s ()
go !_ !_ !i | i == size = return ()
go !v !rng !i = do
let (!block, !rng') = Random.uniformR (0, lastBlock) rng
Expand Down

0 comments on commit 50a8a63

Please sign in to comment.