Skip to content

Commit

Permalink
Remove support for GHC 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewthad authored and Bodigrim committed Jan 5, 2023
1 parent 13ac971 commit bfb2f7c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 42 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ jobs:
compilerVersion: 8.2.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
Expand Down
2 changes: 1 addition & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ghcup-jobs: >=8.0
ghcup-jobs: >=8.2
docspec: True
docspec-options: --timeout 2
haddock: >=8.6
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Unreleased

* Remove support for GHC 8.0.

### 2.0.1

* Improve portability of C and C++ code.
Expand Down
28 changes: 0 additions & 28 deletions src/Data/Text/Internal/ByteStringCompat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ import Data.Word (Word8)
import Foreign.ForeignPtr (ForeignPtr)

#if !MIN_VERSION_bytestring(0,11,0)
#if MIN_VERSION_base(4,10,0)
import GHC.ForeignPtr (plusForeignPtr)
#else
import GHC.ForeignPtr (ForeignPtr(ForeignPtr))
import GHC.Types (Int (..))
import GHC.Prim (plusAddr#)
#endif
#endif

mkBS :: ForeignPtr Word8 -> Int -> ByteString
Expand All @@ -32,25 +26,3 @@ withBS (BS !sfp !slen) kont = kont sfp slen
withBS (PS !sfp !soff !slen) kont = kont (plusForeignPtr sfp soff) slen
#endif
{-# INLINE withBS #-}

#if !MIN_VERSION_bytestring(0,11,0)
#if !MIN_VERSION_base(4,10,0)
-- |Advances the given address by the given offset in bytes.
--
-- The new 'ForeignPtr' shares the finalizer of the original,
-- equivalent from a finalization standpoint to just creating another
-- reference to the original. That is, the finalizer will not be
-- called before the new 'ForeignPtr' is unreachable, nor will it be
-- called an additional time due to this call, and the finalizer will
-- be called with the same address that it would have had this call
-- not happened, *not* the new address.
plusForeignPtr :: ForeignPtr a -> Int -> ForeignPtr b
plusForeignPtr (ForeignPtr addr guts) (I# offset) = ForeignPtr (plusAddr# addr offset) guts
{-# INLINE [0] plusForeignPtr #-}
{-# RULES
"ByteString plusForeignPtr/0" forall fp .
plusForeignPtr fp 0 = fp
#-}
#endif
#endif

3 changes: 0 additions & 3 deletions tests/Tests/Properties/LowLevel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ testLowLevel =
[ (`hasNoTypes` [''Char, ''[]])
, (`doesNotUseAnyOf` ['T.pack, 'S.unstream, 'T.map, 'safe, 'S.streamList])
, (`doesNotUseAnyOf` ['GHC.unpackCString#, 'GHC.unpackCStringUtf8#])
#if MIN_VERSION_base(4,10,0)
-- skip this test for GHC 8.0
, (`doesNotUseAnyOf` ['T.unpackCString#, 'T.unpackCStringAscii#])
#endif
]
't_literal_foo)
#endif
Expand Down
9 changes: 4 additions & 5 deletions text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ copyright: 2009-2011 Bryan O'Sullivan, 2008-2009 Tom Harper, 2021 Andrew Le
category: Data, Text
build-type: Simple
tested-with:
GHC == 8.0.2
GHC == 8.2.2
GHC == 8.4.4
GHC == 8.6.5
Expand Down Expand Up @@ -117,7 +116,7 @@ library

-- Certain version of GHC crash on Windows, when TemplateHaskell encounters C++.
-- https://gitlab.haskell.org/ghc/ghc/-/issues/19417
if flag(simdutf) && os(windows) && impl(ghc == 8.0.1 || >= 8.8 && < 8.10.5 || == 9.0.1)
if flag(simdutf) && os(windows) && impl(ghc >= 8.8 && < 8.10.5 || == 9.0.1)
build-depends: base < 0

-- For GHC 8.2, 8.6.3 and 8.10.1 even TH + C crash Windows linker.
Expand Down Expand Up @@ -187,7 +186,7 @@ library

build-depends:
array >= 0.3 && < 0.6,
base >= 4.9 && < 5,
base >= 4.10 && < 5,
binary >= 0.5 && < 0.9,
bytestring >= 0.10.4 && < 0.12,
deepseq >= 1.1 && < 1.5,
Expand Down Expand Up @@ -266,9 +265,9 @@ test-suite tests
transformers,
text

-- Plugin infrastructure does not work properly in 8.0.1 and 8.6.1, and
-- Plugin infrastructure does not work properly in 8.6.1, and
-- ghc-9.2.1 library depends on parsec, which causes a circular dependency.
if impl(ghc >= 8.0.2 && < 8.6 || >= 8.6.2 && < 9.2 || >= 9.2.2)
if impl(ghc >= 8.2.1 && < 8.6 || >= 8.6.2 && < 9.2 || >= 9.2.2)
build-depends: tasty-inspection-testing

default-language: Haskell2010
Expand Down

0 comments on commit bfb2f7c

Please sign in to comment.