text-show 3.9.4 → 3.9.5
raw patch · 5 files changed
+37/−8 lines, 5 files
Files
- CHANGELOG.md +4/−0
- src/TextShow/Data/Complex.hs +24/−0
- src/TextShow/GHC/Stats.hs +4/−0
- tests/Instances/GHC/RTS/Flags.hs +2/−6
- text-show.cabal +3/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+### 3.9.5 [2022.01.03]+* Work around a GHC 8.0–specific issue in which GHC's simplifier ticks would+ become exhausted, causing compilation to fail.+ ### 3.9.4 [2021.12.26] * Allow the test suite to build with `text-2.0.*` and `transformers-compat-0.7.1`.
src/TextShow/Data/Complex.hs view
@@ -1,5 +1,10 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-}+#if __GLASGOW_HASKELL__ == 800+-- See Note [Increased simpl-tick-factor on old GHCs]+{-# OPTIONS_GHC -fsimpl-tick-factor=200 #-}+#endif {-| Module: TextShow.Data.Ratio@@ -30,3 +35,22 @@ -- | /Since: 2/ $(deriveTextShow1 ''Complex)++{-+Note [Increased simpl-tick-factor on old GHCs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Compiling certain text-show modules with optimizations on old versions of GHC+(particularly 8.0 and 8.2) will trigger "Simplifier ticks exhausted" panics.+To make things worse, this sometimes depends on whether a certain version of+the text library is being used. There are two possible ways to work around+this issue:++1. Figure out which uses of the INLINE pragma in text-show are responsible+ and remove them.+2. Just increase the tick limit.++Since executing on (1) will require a lot of effort to fix an issue that only+happens on old versions of GHC, I've opted for the simple solution of (2) for+now. Issue #51 is a reminder to revisit this choice.+-}
src/TextShow/GHC/Stats.hs view
@@ -4,6 +4,10 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} {-# OPTIONS_GHC -fno-warn-orphans #-}+# if __GLASGOW_HASKELL__ == 800+-- See Note [Increased simpl-tick-factor on old GHCs] in TextShow.Data.Complex+{-# OPTIONS_GHC -fsimpl-tick-factor=200 #-}+# endif #endif {-|
tests/Instances/GHC/RTS/Flags.hs view
@@ -8,12 +8,8 @@ {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} # if __GLASGOW_HASKELL__ == 802--- For whatever reason, compiling this module with optimizations on GHC 8.2.2--- triggers a "Simplifier ticks exhausted" panic, and increasing the tick limit--- doesn't seem to help. Moreover, 8.2.2 is the /only/ GHC version I have seen--- this happen on. Life is short, so I'm just going to work around this by--- disabling optimizations on 8.2.2 only.-{-# OPTIONS_GHC -O0 #-}+-- See Note [Increased simpl-tick-factor on old GHCs] in TextShow.Data.Complex+{-# OPTIONS_GHC -fsimpl-tick-factor=200 #-} # endif #endif
text-show.cabal view
@@ -1,5 +1,5 @@ name: text-show-version: 3.9.4+version: 3.9.5 synopsis: Efficient conversion of values into Text description: @text-show@ offers a replacement for the @Show@ typeclass intended for use with @Text@ instead of @String@s. This package was created@@ -50,8 +50,9 @@ , GHC == 8.4.4 , GHC == 8.6.5 , GHC == 8.8.4- , GHC == 8.10.4+ , GHC == 8.10.7 , GHC == 9.0.1+ , GHC == 9.2.1 extra-source-files: CHANGELOG.md, README.md, include/*.h cabal-version: >=1.10