Skip to content

Commit

Permalink
v0.7.2: drop support for old-time, allow latest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jun 25, 2024
1 parent 6b08a18 commit 4b0a1af
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 57 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
## Version 0.7.2 (2024-06-25)

- Remove flag `old-time` and drop support for `old-time`.
- Remove support for GHC 7.
- Tested with GHC 8.0 - 9.10.

## Version 0.7.1 (2023-12-06) Santa Clause edition

- Add `System.PosixCompat.Process` module, exporting `getProcessID`
- Add `System.PosixCompat.Process` module, exporting `getProcessID`.

## Version 0.7 (2023-03-15)

- Remove `System.PosixCompat.User` module
- Remove `System.PosixCompat.User` module.

## Version 0.6 (2022-05-22)

- Better support for symbolic links
- Better support for symbolic links.
12 changes: 0 additions & 12 deletions src/System/PosixCompat/Internal/Time.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ module System.PosixCompat.Internal.Time (
) where

import System.Posix.Types (EpochTime)

#ifdef OLD_TIME

import System.Time (ClockTime(TOD), getClockTime)

clockTimeToEpochTime :: ClockTime -> EpochTime
clockTimeToEpochTime (TOD s _) = fromInteger s

#else

import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)

type ClockTime = POSIXTime
Expand All @@ -29,5 +19,3 @@ getClockTime = getPOSIXTime

clockTimeToEpochTime :: ClockTime -> EpochTime
clockTimeToEpochTime = fromInteger . floor

#endif
64 changes: 22 additions & 42 deletions unix-compat.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cabal-version: >= 1.10
name: unix-compat
version: 0.7.1
version: 0.7.2
synopsis: Portable POSIX-compatibility layer.
description: This package provides portable implementations of parts
of the unix package. This package re-exports the unix
Expand All @@ -13,7 +14,6 @@ author: Björn Bringert, Duncan Coutts, Jacob Stanley, Bryan O'Sullivan
maintainer: https://github.com/haskell-pkg-janitors
category: System
build-type: Simple
cabal-version: >= 1.10

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

flag old-time
description: build against old-time package
default: False

Library
default-language: Haskell2010
hs-source-dirs: src
ghc-options: -Wall
build-depends: base == 4.*

exposed-modules:
System.PosixCompat
Expand All @@ -56,27 +49,18 @@ Library
System.PosixCompat.Types
System.PosixCompat.Unistd

build-depends: base >= 4.9 && < 5

if os(windows)
c-sources:
cbits/HsUname.c
cbits/mktemp.c

extra-libraries: msvcrt
build-depends: Win32 >= 2.5.0.0
build-depends: filepath >= 1.0 && < 1.5

if flag(old-time)
build-depends: old-time >= 1.0.0.0 && < 1.2.0.0
cpp-options: -DOLD_TIME

if impl(ghc < 7)
build-depends: directory == 1.0.*
cpp-options: -DDIRECTORY_1_0
else
build-depends: directory == 1.1.*
else
build-depends: time >= 1.0 && < 1.13
build-depends: directory >= 1.3.1 && < 1.4
build-depends: Win32 >= 2.5.0.0
build-depends: directory >= 1.3.1 && < 1.4
build-depends: filepath >= 1.0 && < 1.6
build-depends: time >= 1.0 && < 1.13

other-modules:
System.PosixCompat.Internal.Time
Expand All @@ -90,11 +74,14 @@ Library
if os(solaris)
cc-options: -DSOLARIS

Test-Suite unix-compat-testsuite
default-language: Haskell2010
ghc-options:
-Wall
-Wcompat

Test-Suite unix-compat-testsuite
type: exitcode-stdio-1.0
hs-source-dirs: tests
ghc-options: -Wall
main-is: main.hs

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

build-depends:
unix-compat
, base == 4.*
, base
, monad-parallel
, hspec
, HUnit
, directory
, directory >= 1.3.1.0
-- directory-1.3.1.0 adds createFileLink
, extra
, temporary

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

-- extra-libraries: msvcrt
-- build-depends: Win32 >= 2.5.0.0

if flag(old-time)
build-depends: old-time >= 1.0.0.0 && < 1.2.0.0
cpp-options: -DOLD_TIME

if impl(ghc < 7)
build-depends: directory == 1.0.*
cpp-options: -DDIRECTORY_1_0
else
build-depends: directory == 1.1.*
else
build-depends: time >= 1.0 && < 1.13
build-depends: directory >= 1.3.1 && < 1.4
build-depends: time
build-depends: directory

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

build-depends: directory >= 1.3.1 && < 1.4
default-language: Haskell2010
ghc-options:
-Wall
-Wcompat

0 comments on commit 4b0a1af

Please sign in to comment.