on master help sign in
Use default-extensions for tests.
745265epranaysashank
streamly.cabal+31−29
@@ -242,6 +242,35 @@ common compile-options
242 -Wredundant-constraints
242 -Wredundant-constraints
243 -Wnoncanonical-monad-instances
243 -Wnoncanonical-monad-instances
244
244
245+common default-extensions
246+ default-extensions:
247+ BangPatterns
248+ CApiFFI
249+ CPP
250+ ConstraintKinds
251+ DeriveDataTypeable
252+ DeriveGeneric
253+ DeriveTraversable
254+ ExistentialQuantification
255+ FlexibleContexts
256+ FlexibleInstances
257+ GeneralizedNewtypeDeriving
258+ InstanceSigs
259+ KindSignatures
260+ LambdaCase
261+ MagicHash
262+ MultiParamTypeClasses
263+ PatternSynonyms
264+ RankNTypes
265+ RecordWildCards
266+ ScopedTypeVariables
267+ TupleSections
268+ ViewPatterns
269+
270+ -- UndecidableInstances -- Does not show any perf impact
271+ -- TypeFamilies -- Causes large regressions and improvements
272+ -- UnboxedTuples -- interferes with (#.)
273+
245common optimization-options
274common optimization-options
246 ghc-options: -O2
275 ghc-options: -O2
247 -fdicts-strict
276 -fdicts-strict
@@ -259,13 +288,13 @@ common threading-options
259-- -O2 here some concurrent/nested benchmarks improved and others regressed.
288-- -O2 here some concurrent/nested benchmarks improved and others regressed.
260-- We can investigate a bit more here why the regression occurred.
289-- We can investigate a bit more here why the regression occurred.
261common lib-options
290common lib-options
262− import: compile-options, optimization-options
291+ import: compile-options, optimization-options, default-extensions
263
292
264-- Compilation for coverage builds on CI machines takes too long without -O0
293-- Compilation for coverage builds on CI machines takes too long without -O0
265-- XXX we should use coverage flag for that, -O0 may take too long to run tests
294-- XXX we should use coverage flag for that, -O0 may take too long to run tests
266-- in general.
295-- in general.
267common test-options
296common test-options
268− import: compile-options, threading-options
297+ import: compile-options, threading-options, default-extensions
269
298
270 ghc-options: -O0
299 ghc-options: -O0
271 -fno-ignore-asserts
300 -fno-ignore-asserts
@@ -289,33 +318,6 @@ common exe-options
289
318
290library
319library
291 import: lib-options
320 import: lib-options
292− default-extensions:
293− BangPatterns
294− CApiFFI
295− CPP
296− ConstraintKinds
297− DeriveDataTypeable
298− DeriveGeneric
299− DeriveTraversable
300− ExistentialQuantification
301− FlexibleContexts
302− FlexibleInstances
303− GeneralizedNewtypeDeriving
304− InstanceSigs
305− KindSignatures
306− LambdaCase
307− MagicHash
308− MultiParamTypeClasses
309− PatternSynonyms
310− RankNTypes
311− RecordWildCards
312− ScopedTypeVariables
313− TupleSections
314− ViewPatterns
315−
316− -- UndecidableInstances -- Does not show any perf impact
317− -- TypeFamilies -- Causes large regressions and improvements
318− -- UnboxedTuples -- interferes with (#.)
319
321
320 if impl(ghc >= 8.1)
322 if impl(ghc >= 8.1)
321 default-extensions: TypeApplications
323 default-extensions: TypeApplications
test/Main.hs−5
@@ -1,8 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE RankNTypes #-}
4−{-# LANGUAGE ScopedTypeVariables #-}
5−
6module Main (main) where
1module Main (main) where
7
2
8import Control.Concurrent (threadDelay)
3import Control.Concurrent (threadDelay)
test/MaxRate.hs−3
@@ -1,6 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−
4import Streamly
1import Streamly
5import qualified Streamly.Prelude as S
2import qualified Streamly.Prelude as S
6import Streamly.Internal.Data.Time.Clock (getTime, Clock(..))
3import Streamly.Internal.Data.Time.Clock (getTime, Clock(..))
test/Prop.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
2{-# LANGUAGE OverloadedLists #-}
1{-# LANGUAGE OverloadedLists #-}
3{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE TypeFamilies #-}
4
3
test/PureStreams.hs−5
@@ -1,12 +1,7 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE MonadComprehensions #-}
1{-# LANGUAGE MonadComprehensions #-}
4{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE TypeFamilies #-}
5{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE OverloadedStrings #-}
6{-# LANGUAGE OverloadedLists #-}
4{-# LANGUAGE OverloadedLists #-}
7−{-# LANGUAGE PatternSynonyms #-}
8−{-# LANGUAGE ViewPatterns #-}
9−{-# LANGUAGE ScopedTypeVariables #-}
10
5
11module Main (main) where
6module Main (main) where
12
7
test/Streamly/Test/Array.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−
3-- |
1-- |
4-- Module : Main
2-- Module : Main
5-- Copyright : (c) 2019 Composewell Technologies
3-- Copyright : (c) 2019 Composewell Technologies
test/Streamly/Test/Internal/Prelude.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE ScopedTypeVariables #-}
2−
3-- |
1-- |
4-- Module : Main
2-- Module : Main
5-- Copyright : (c) 2019 Composewell Technologies
3-- Copyright : (c) 2019 Composewell Technologies
test/String.hs−3
@@ -1,6 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−
4module Main (main) where
1module Main (main) where
5
2
6import Data.Char (ord, chr)
3import Data.Char (ord, chr)