Enable TypeFamilies extension with NoMonoLocalBinds
MonoLocalBinds enabled by TypeFamilies causes performance regressions
see #567, however we can enable TypeFamilies without it.
commit095513166d0904ab9b63edf61de55a415150fc52
authorHarendra Kumar <harendra@composewell.com>
dateThu 2 Jul 2020, 23:37 (6 years ago)
parent09f2fa7
src/Streamly/Internal/Data/List.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
21{-# LANGUAGE UndecidableInstances #-}
32
43-- |
src/Streamly/Internal/Data/Prim/Array/Types.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
21{-# LANGUAGE UnboxedTuples #-}
32
43-- |
src/Streamly/Internal/Data/SmallArray/Types.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
21{-# LANGUAGE UnboxedTuples #-}
32
43-- |
src/Streamly/Internal/Data/Stream/Serial.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
21{-# LANGUAGE UndecidableInstances #-}
32
43-- |
src/Streamly/Internal/Data/Stream/Zip.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
21{-# LANGUAGE UndecidableInstances #-}
32
43-- |
src/Streamly/Internal/Memory/Array/Types.hs−1
@@ -1,4 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
21{-# LANGUAGE UnboxedTuples #-}
32
43#include "inline.hs"
src/Streamly/Memory/Malloc.hs−2
@@ -1,5 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
2−
31#include "inline.hs"
42
53-- |
streamly.cabal+6−1
@@ -266,10 +266,15 @@ common default-extensions
266266 RecordWildCards
267267 ScopedTypeVariables
268268 TupleSections
269+ TypeFamilies
269270 ViewPatterns
270271
272+ -- MonoLocalBinds, enabled by TypeFamilies, causes performance
273+ -- regressions. Disable it. This must come after TypeFamilies,
274+ -- otherwise TypeFamilies will enable it again.
275+ NoMonoLocalBinds
276+
271277 -- UndecidableInstances -- Does not show any perf impact
272− -- TypeFamilies -- Causes large regressions and improvements
273278 -- UnboxedTuples -- interferes with (#.)
274279
275280common optimization-options
test/Prop.hs−1
@@ -1,5 +1,4 @@
11{-# LANGUAGE OverloadedLists #-}
2−{-# LANGUAGE TypeFamilies #-}
32
43module Main (main) where
54
test/PureStreams.hs−1
@@ -1,5 +1,4 @@
11{-# LANGUAGE MonadComprehensions #-}
2−{-# LANGUAGE TypeFamilies #-}
32{-# LANGUAGE OverloadedStrings #-}
43{-# LANGUAGE OverloadedLists #-}
54