Skip to content

Commit 85761be

Browse files
committed
v0.7.2: drop support for old-time, allow latest dependencies
1 parent ef41655 commit 85761be

File tree

3 files changed

+31
-57
lines changed

3 files changed

+31
-57
lines changed

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
## Version 0.7.2 (2024-06-25)
2+
3+
- Remove flag `old-time` and drop support for `old-time`.
4+
- Remove support for GHC 7.
5+
- Tested with GHC 8.0 - 9.10.
6+
17
## Version 0.7.1 (2023-12-06) Santa Clause edition
28

3-
- Add `System.PosixCompat.Process` module, exporting `getProcessID`
9+
- Add `System.PosixCompat.Process` module, exporting `getProcessID`.
410

511
## Version 0.7 (2023-03-15)
612

7-
- Remove `System.PosixCompat.User` module
13+
- Remove `System.PosixCompat.User` module.
814

915
## Version 0.6 (2022-05-22)
1016

11-
- Better support for symbolic links
17+
- Better support for symbolic links.

src/System/PosixCompat/Internal/Time.hs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ module System.PosixCompat.Internal.Time (
1010
) where
1111

1212
import System.Posix.Types (EpochTime)
13-
14-
#ifdef OLD_TIME
15-
16-
import System.Time (ClockTime(TOD), getClockTime)
17-
18-
clockTimeToEpochTime :: ClockTime -> EpochTime
19-
clockTimeToEpochTime (TOD s _) = fromInteger s
20-
21-
#else
22-
2313
import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)
2414

2515
type ClockTime = POSIXTime
@@ -29,5 +19,3 @@ getClockTime = getPOSIXTime
2919

3020
clockTimeToEpochTime :: ClockTime -> EpochTime
3121
clockTimeToEpochTime = fromInteger . floor
32-
33-
#endif

unix-compat.cabal

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
cabal-version: >= 1.10
12
name: unix-compat
2-
version: 0.7.1
3+
version: 0.7.2
34
synopsis: Portable POSIX-compatibility layer.
45
description: This package provides portable implementations of parts
56
of the unix package. This package re-exports the unix
@@ -13,7 +14,6 @@ author: Björn Bringert, Duncan Coutts, Jacob Stanley, Bryan O'Sullivan
1314
maintainer: https://github.com/haskell-pkg-janitors
1415
category: System
1516
build-type: Simple
16-
cabal-version: >= 1.10
1717

1818
tested-with:
1919
GHC == 9.10.1
@@ -36,15 +36,8 @@ source-repository head
3636
type: git
3737
location: https://github.com/haskell-pkg-janitors/unix-compat.git
3838

39-
flag old-time
40-
description: build against old-time package
41-
default: False
42-
4339
Library
44-
default-language: Haskell2010
4540
hs-source-dirs: src
46-
ghc-options: -Wall
47-
build-depends: base == 4.*
4841

4942
exposed-modules:
5043
System.PosixCompat
@@ -56,27 +49,18 @@ Library
5649
System.PosixCompat.Types
5750
System.PosixCompat.Unistd
5851

52+
build-depends: base >= 4.9 && < 5
53+
5954
if os(windows)
6055
c-sources:
6156
cbits/HsUname.c
6257
cbits/mktemp.c
6358

6459
extra-libraries: msvcrt
65-
build-depends: Win32 >= 2.5.0.0
66-
build-depends: filepath >= 1.0 && < 1.5
67-
68-
if flag(old-time)
69-
build-depends: old-time >= 1.0.0.0 && < 1.2.0.0
70-
cpp-options: -DOLD_TIME
71-
72-
if impl(ghc < 7)
73-
build-depends: directory == 1.0.*
74-
cpp-options: -DDIRECTORY_1_0
75-
else
76-
build-depends: directory == 1.1.*
77-
else
78-
build-depends: time >= 1.0 && < 1.13
79-
build-depends: directory >= 1.3.1 && < 1.4
60+
build-depends: Win32 >= 2.5.0.0
61+
build-depends: directory >= 1.3.1 && < 1.4
62+
build-depends: filepath >= 1.0 && < 1.6
63+
build-depends: time >= 1.0 && < 1.13
8064

8165
other-modules:
8266
System.PosixCompat.Internal.Time
@@ -90,11 +74,14 @@ Library
9074
if os(solaris)
9175
cc-options: -DSOLARIS
9276

93-
Test-Suite unix-compat-testsuite
9477
default-language: Haskell2010
78+
ghc-options:
79+
-Wall
80+
-Wcompat
81+
82+
Test-Suite unix-compat-testsuite
9583
type: exitcode-stdio-1.0
9684
hs-source-dirs: tests
97-
ghc-options: -Wall
9885
main-is: main.hs
9986

10087
other-modules:
@@ -119,11 +106,12 @@ Test-Suite unix-compat-testsuite
119106

120107
build-depends:
121108
unix-compat
122-
, base == 4.*
109+
, base
123110
, monad-parallel
124111
, hspec
125112
, HUnit
126-
, directory
113+
, directory >= 1.3.1.0
114+
-- directory-1.3.1.0 adds createFileLink
127115
, extra
128116
, temporary
129117

@@ -134,19 +122,8 @@ Test-Suite unix-compat-testsuite
134122

135123
-- extra-libraries: msvcrt
136124
-- build-depends: Win32 >= 2.5.0.0
137-
138-
if flag(old-time)
139-
build-depends: old-time >= 1.0.0.0 && < 1.2.0.0
140-
cpp-options: -DOLD_TIME
141-
142-
if impl(ghc < 7)
143-
build-depends: directory == 1.0.*
144-
cpp-options: -DDIRECTORY_1_0
145-
else
146-
build-depends: directory == 1.1.*
147-
else
148-
build-depends: time >= 1.0 && < 1.13
149-
build-depends: directory >= 1.3.1 && < 1.4
125+
build-depends: time
126+
build-depends: directory
150127

151128
-- other-modules:
152129
-- System.PosixCompat.Internal.Time
@@ -160,4 +137,7 @@ Test-Suite unix-compat-testsuite
160137
if os(solaris)
161138
cc-options: -DSOLARIS
162139

163-
build-depends: directory >= 1.3.1 && < 1.4
140+
default-language: Haskell2010
141+
ghc-options:
142+
-Wall
143+
-Wcompat

0 commit comments

Comments
 (0)