mirror of
https://github.com/composewell/streamly.git
synced 2024-09-19 15:37:48 +03:00
Fix build/travis config for ghc 7.10.3
This commit is contained in:
parent
154a610eb2
commit
b64959290f
@ -14,8 +14,12 @@ cache:
|
||||
matrix:
|
||||
include:
|
||||
# cabal/linux
|
||||
- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
|
||||
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
|
||||
# cabal build for GHC 7.10.3 hangs
|
||||
#- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
|
||||
#addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
|
||||
|
||||
- env: BUILD=stack RESOLVER=lts-6.35 CABALVER=1.22
|
||||
addons: {apt: {packages: [libgmp-dev,cabal-install-1.22], sources: [hvr-ghc]}}
|
||||
|
||||
# stack/linux use a pre-installed cabal-install for faster builds
|
||||
# GHC 8.0.1
|
||||
|
@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Main where
|
||||
|
||||
import Control.Applicative (Alternative(..))
|
||||
@ -13,8 +15,10 @@ import qualified Asyncly as A
|
||||
import qualified Conduit.Simple as S
|
||||
import qualified Control.Monad.Logic as LG
|
||||
import qualified Data.Machine as M
|
||||
#if MIN_VERSION_transient(0,5,1)
|
||||
import qualified Transient.Internals as T
|
||||
import qualified Transient.Indeterminism as T
|
||||
#endif
|
||||
import qualified ListT as LT
|
||||
|
||||
main :: IO ()
|
||||
@ -29,8 +33,10 @@ main = do
|
||||
, bench "asyncly-interleaved-nil" $ nfIO (asyncly_nil (A.<=>))
|
||||
, bench "asyncly-parleft-nil" $ nfIO (asyncly_nil (A.<|))
|
||||
, bench "asyncly-parinterleaved-nil" $ nfIO (asyncly_nil (A.<|>))
|
||||
#if MIN_VERSION_transient(0,5,1)
|
||||
, bench "transient" $ nfIO transient_basic
|
||||
, bench "transient-nil" $ nfIO transient_nil
|
||||
#endif
|
||||
, bench "logict" $ nfIO logict_basic
|
||||
, bench "list-t" $ nfIO list_t_basic
|
||||
, bench "simple-conduit" $ nfIO simple_conduit_basic
|
||||
@ -58,6 +64,7 @@ drop num x = do
|
||||
guard mn
|
||||
return x
|
||||
|
||||
#if MIN_VERSION_transient(0,5,1)
|
||||
tmap :: (a -> Int) -> a -> T.TransIO Int
|
||||
tmap = Main.map
|
||||
|
||||
@ -68,6 +75,7 @@ tdrop :: Int -> Int -> T.TransIO Int
|
||||
tdrop = Main.drop
|
||||
|
||||
transient_basic :: IO (Maybe Int)
|
||||
|
||||
transient_basic = T.keep' $ T.threads 0 $ do
|
||||
liftIO $ writeIORef count 0
|
||||
xs <- T.group 49900 $ do
|
||||
@ -87,6 +95,7 @@ transient_nil = T.keep' $ T.threads 0 $ do
|
||||
T.choose [1..100000 :: Int]
|
||||
assert (Prelude.length xs == 49900) $
|
||||
T.exit (Prelude.length xs)
|
||||
#endif
|
||||
|
||||
amap :: (Int -> Int) -> Int -> A.AsyncT IO Int
|
||||
amap = Main.map
|
||||
|
Loading…
Reference in New Issue
Block a user