Skip to content

Commit 5ca587a

Browse files
Bodigrimhs-viktor
authored andcommitted
Drop GHC < 8.2
1 parent 72ae003 commit 5ca587a

32 files changed

+7
-175
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,16 @@ defaults:
1111
shell: bash
1212

1313
jobs:
14-
build-old:
15-
runs-on: ${{ matrix.os }}
16-
strategy:
17-
fail-fast: true
18-
matrix:
19-
os: [ubuntu-latest]
20-
ghc: ['7.8.4', '7.6.3', '7.4.2']
21-
steps:
22-
- uses: actions/checkout@v2
23-
- uses: actions/cache@v2.1.4
24-
name: Cache cabal stuff
25-
with:
26-
path: |
27-
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
28-
dist-newstyle
29-
key: ${{ runner.os }}-${{ matrix.ghc }}
30-
- name: Install GHC
31-
run: |
32-
sudo add-apt-repository ppa:hvr/ghc -y
33-
sudo apt-get update
34-
sudo apt-get install ghc-${{ matrix.ghc }}
35-
- name: Build
36-
run: |
37-
autoreconf -i
38-
cabal sdist -z -o .
39-
cabal get unix-*.tar.gz
40-
cd unix-*/
41-
cabal update
42-
cabal test -w /opt/ghc/bin/ghc-${{ matrix.ghc }} all
43-
- name: Haddock
44-
run: cabal haddock -w /opt/ghc/bin/ghc-${{ matrix.ghc }}
45-
4614
build:
47-
needs: build-old
4815
runs-on: ${{ matrix.os }}
4916
strategy:
5017
fail-fast: true
5118
matrix:
5219
os: [ubuntu-latest, macOS-latest]
53-
ghc: ['8.10', '8.8', '8.6', '8.4', '8.2', '8.0', '7.10']
20+
ghc: ['9.0', '8.10', '8.8', '8.6', '8.4', '8.2']
5421
steps:
5522
- uses: actions/checkout@v2
56-
- uses: actions/setup-haskell@v1
23+
- uses: haskell/actions/setup@v1
5724
id: setup-haskell-cabal
5825
with:
5926
ghc-version: ${{ matrix.ghc }}

System/Posix/ByteString/FilePath.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62

73
-----------------------------------------------------------------------------
84
-- |

System/Posix/Directory.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{-# LANGUAGE CApiFFI #-}
22
{-# LANGUAGE NondecreasingIndentation #-}
3-
#if __GLASGOW_HASKELL__ >= 709
43
{-# LANGUAGE Safe #-}
5-
#else
6-
{-# LANGUAGE Trustworthy #-}
7-
#endif
84

95
-----------------------------------------------------------------------------
106
-- |

System/Posix/Directory/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{-# LANGUAGE CApiFFI #-}
22
{-# LANGUAGE NondecreasingIndentation #-}
3-
#if __GLASGOW_HASKELL__ >= 709
43
{-# LANGUAGE Safe #-}
5-
#else
6-
{-# LANGUAGE Trustworthy #-}
7-
#endif
84

95
-----------------------------------------------------------------------------
106
-- |

System/Posix/Directory/Common.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62

73
-----------------------------------------------------------------------------
84
-- |

System/Posix/DynamicLinker.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.DynamicLinker

System/Posix/DynamicLinker/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62

73
-----------------------------------------------------------------------------
84
-- |

System/Posix/DynamicLinker/Common.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.DynamicLinker.Common

System/Posix/DynamicLinker/Module.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.DynamicLinker.Module

System/Posix/DynamicLinker/Module/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62

73
-----------------------------------------------------------------------------
84
-- |

System/Posix/DynamicLinker/Prim.hsc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{-# LANGUAGE Trustworthy #-}
2-
#if __GLASGOW_HASKELL__ >= 709
3-
{-# OPTIONS_GHC -fno-warn-trustworthy-safe #-}
4-
#endif
52

63
-----------------------------------------------------------------------------
74
-- |

System/Posix/Env.hsc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Env
@@ -42,12 +38,6 @@ import Control.Monad
4238
import Data.Maybe (fromMaybe)
4339
import System.Posix.Internals
4440

45-
#if !MIN_VERSION_base(4,7,0)
46-
-- needed for backported local 'newFilePath' binding in 'putEnv'
47-
import GHC.IO.Encoding (getFileSystemEncoding)
48-
import qualified GHC.Foreign as GHC (newCString)
49-
#endif
50-
5141
-- |'getEnv' looks up a variable in the environment.
5242

5343
getEnv ::
@@ -150,11 +140,6 @@ putEnv keyvalue = do s <- newFilePath keyvalue
150140
-- According to SUSv2, the string passed to putenv
151141
-- becomes part of the environment. #7342
152142
throwErrnoIfMinus1_ "putenv" (c_putenv s)
153-
#if !MIN_VERSION_base(4,7,0)
154-
where
155-
newFilePath :: FilePath -> IO CString
156-
newFilePath fp = getFileSystemEncoding >>= \enc -> GHC.newCString enc fp
157-
#endif
158143

159144
foreign import ccall unsafe "putenv"
160145
c_putenv :: CString -> IO CInt

System/Posix/Env/ByteString.hsc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
{-# LANGUAGE Trustworthy #-}
3-
#if __GLASGOW_HASKELL__ >= 709
4-
{-# OPTIONS_GHC -fno-warn-trustworthy-safe #-}
5-
#endif
2+
{-# LANGUAGE Safe #-}
63

74
-----------------------------------------------------------------------------
85
-- |

System/Posix/Error.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE CPP #-}
2-
#if __GLASGOW_HASKELL__ >= 709
31
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
72
-----------------------------------------------------------------------------
83
-- |
94
-- Module : System.Posix.Error

System/Posix/Fcntl.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Fcntl

System/Posix/Files.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
{-# LANGUAGE CApiFFI #-}
73

84
-----------------------------------------------------------------------------

System/Posix/Files/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
{-# LANGUAGE CApiFFI #-}
73

84
-----------------------------------------------------------------------------

System/Posix/IO.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.IO

System/Posix/IO/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.IO.ByteString

System/Posix/IO/Common.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{-# LANGUAGE CApiFFI #-}
22
{-# LANGUAGE NondecreasingIndentation #-}
33
{-# LANGUAGE RecordWildCards #-}
4-
#if __GLASGOW_HASKELL__ >= 709
54
{-# LANGUAGE Safe #-}
6-
#else
7-
{-# LANGUAGE Trustworthy #-}
8-
#endif
95

106
-----------------------------------------------------------------------------
117
-- |

System/Posix/Process.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.Process

System/Posix/Process/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62

73
-----------------------------------------------------------------------------
84
-- |

System/Posix/Resource.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Resource

System/Posix/Semaphore.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.Semaphore

System/Posix/SharedMem.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#if __GLASGOW_HASKELL__ >= 709
21
{-# LANGUAGE Safe #-}
3-
#else
4-
{-# LANGUAGE Trustworthy #-}
5-
#endif
62
-----------------------------------------------------------------------------
73
-- |
84
-- Module : System.Posix.SharedMem

System/Posix/Temp.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Temp

System/Posix/Temp/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Temp.ByteString

System/Posix/Terminal.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Terminal

System/Posix/Terminal/ByteString.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
#if __GLASGOW_HASKELL__ >= 709
32
{-# LANGUAGE Safe #-}
4-
#else
5-
{-# LANGUAGE Trustworthy #-}
6-
#endif
73
-----------------------------------------------------------------------------
84
-- |
95
-- Module : System.Posix.Terminal.ByteString

System/Posix/Time.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{-# LANGUAGE CApiFFI #-}
2-
{-# LANGUAGE CPP #-}
3-
#if __GLASGOW_HASKELL__ >= 709
42
{-# LANGUAGE Safe #-}
5-
#else
6-
{-# LANGUAGE Trustworthy #-}
7-
#endif
83
-----------------------------------------------------------------------------
94
-- |
105
-- Module : System.Posix.Time

System/Posix/Unistd.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{-# LANGUAGE CApiFFI #-}
22
{-# LANGUAGE NondecreasingIndentation #-}
3-
#if __GLASGOW_HASKELL__ >= 709
43
{-# LANGUAGE Safe #-}
5-
#else
6-
{-# LANGUAGE Trustworthy #-}
7-
#endif
84
-----------------------------------------------------------------------------
95
-- |
106
-- Module : System.Posix.Unistd

unix.cabal

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ bug-reports: https://github.com/haskell/unix/issues
1111
synopsis: POSIX functionality
1212
category: System
1313
build-type: Configure
14-
tested-with: GHC==8.10.2,
14+
tested-with: GHC==9.0.1,
15+
GHC==8.10.4,
1516
GHC==8.8.4,
1617
GHC==8.6.5,
1718
GHC==8.4.4,
18-
GHC==8.2.2,
19-
GHC==8.0.2,
20-
GHC==7.10.3,
21-
GHC==7.8.4,
22-
GHC==7.6.3,
23-
GHC==7.4.2
19+
GHC==8.2.2
2420
description:
2521
This package gives you access to the set of operating system
2622
services standardised by
@@ -72,7 +68,7 @@ library
7268
buildable: False
7369

7470
build-depends:
75-
base >= 4.5 && < 4.15,
71+
base >= 4.10 && < 4.16,
7672
bytestring >= 0.9.2 && < 0.12,
7773
time >= 1.2 && < 1.12
7874

0 commit comments

Comments
 (0)