@@ -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