Skip to content

Commit 8563a89

Browse files
committed
Make the test suite pass with base-4.21.* (GHC 9.12)
1 parent 2eecf81 commit 8563a89

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### next [????.??.??]
2+
* Make the test suite pass with `base-4.21.*` (GHC 9.12).
3+
14
## 3.11 [2024.10.23]
25
* Support building with GHC 9.12.
36
* Add a `TextShow` instance for `IoManagerFlag` in `TextShow.GHC.RTS.Flags`

src/TextShow/Control/Exception.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ module TextShow.Control.Exception () where
2222

2323
import Control.Exception.Base
2424

25-
import Data.Text.Lazy.Builder (fromString, singleton)
25+
import Data.Text.Lazy.Builder (fromString)
26+
#if !MIN_VERSION_base(4,21,0)
27+
import Data.Text.Lazy.Builder (singleton)
28+
#endif
2629

2730
import Prelude ()
2831
import Prelude.Compat
@@ -166,9 +169,13 @@ instance TextShow RecUpdError where
166169

167170
-- | /Since: 2/
168171
instance TextShow ErrorCall where
172+
#if MIN_VERSION_base(4,21,0)
173+
showb (ErrorCall err) = fromString err
174+
#else
169175
showb (ErrorCallWithLocation err "") = fromString err
170176
showb (ErrorCallWithLocation err loc) =
171177
fromString err <> singleton '\n' <> fromString loc
178+
#endif
172179

173180
-- | /Since: 2/
174181
$(deriveTextShow ''MaskingState)

0 commit comments

Comments
 (0)