on master help sign in
Use default-extensions for tests.
commit745265e0f5405116ecf9d729969d7e44f2b6de36 authorpranaysashank <pranaysashank@composewell.com> dateMon 6 Jul 2020, 08:10 (6 years ago) parent287c3a3
8 files changed+31−50
streamly.cabal+31−29 test/Main.hs−5 test/MaxRate.hs−3 test/Prop.hs−1 test/PureStreams.hs−5 test/Streamly/Test/Array.hs−2 test/Streamly/Test/Internal/Prelude.hs−2 test/String.hs−3
streamly.cabal+31−29
@@ -242,6 +242,35 @@ common compile-options
242242 -Wredundant-constraints
243243 -Wnoncanonical-monad-instances
244244
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+
245274common optimization-options
246275 ghc-options: -O2
247276 -fdicts-strict
@@ -259,13 +288,13 @@ common threading-options
259288-- -O2 here some concurrent/nested benchmarks improved and others regressed.
260289-- We can investigate a bit more here why the regression occurred.
261290common lib-options
262− import: compile-options, optimization-options
291+ import: compile-options, optimization-options, default-extensions
263292
264293-- Compilation for coverage builds on CI machines takes too long without -O0
265294-- XXX we should use coverage flag for that, -O0 may take too long to run tests
266295-- in general.
267296common test-options
268− import: compile-options, threading-options
297+ import: compile-options, threading-options, default-extensions
269298
270299 ghc-options: -O0
271300 -fno-ignore-asserts
@@ -289,33 +318,6 @@ common exe-options
289318
290319library
291320 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 (#.)
319321
320322 if impl(ghc >= 8.1)
321323 default-extensions: TypeApplications
test/Main.hs−5
@@ -1,8 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE RankNTypes #-}
4−{-# LANGUAGE ScopedTypeVariables #-}
5−
61module Main (main) where
72
83import Control.Concurrent (threadDelay)
test/MaxRate.hs−3
@@ -1,6 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−
41import Streamly
52import qualified Streamly.Prelude as S
63import Streamly.Internal.Data.Time.Clock (getTime, Clock(..))
test/Prop.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE OverloadedLists #-}
32{-# LANGUAGE TypeFamilies #-}
43
test/PureStreams.hs−5
@@ -1,12 +1,7 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleInstances #-}
31{-# LANGUAGE MonadComprehensions #-}
42{-# LANGUAGE TypeFamilies #-}
53{-# LANGUAGE OverloadedStrings #-}
64{-# LANGUAGE OverloadedLists #-}
7−{-# LANGUAGE PatternSynonyms #-}
8−{-# LANGUAGE ViewPatterns #-}
9−{-# LANGUAGE ScopedTypeVariables #-}
105
116module Main (main) where
127
test/Streamly/Test/Array.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−
31-- |
42-- Module : Main
53-- Copyright : (c) 2019 Composewell Technologies
test/Streamly/Test/Internal/Prelude.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE ScopedTypeVariables #-}
2−
31-- |
42-- Module : Main
53-- Copyright : (c) 2019 Composewell Technologies
test/String.hs−3
@@ -1,6 +1,3 @@
1−{-# LANGUAGE CPP #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−
41module Main (main) where
52
63import Data.Char (ord, chr)