Skip to content

Update dependencies to latest versions#79

Open
b0ralgin wants to merge 6 commits intohaskell-haskey:masterfrom
b0ralgin:master
Open

Update dependencies to latest versions#79
b0ralgin wants to merge 6 commits intohaskell-haskey:masterfrom
b0ralgin:master

Conversation

@b0ralgin
Copy link

  • includes tests
  • ready for review
  • reviewed by @username_here

What does this PR do?

Updates haskey to work with modern Haskell libraries, specifically upgrading from Stack LTS 9.0 (GHC 8.0.2) to LTS 22.44 (GHC 9.6.7). This includes fixing breaking API changes in unix-2.8.x and updating dependency bounds.

Where should the reviewer start?

Start by reviewing the main API change in src-unix/FileIO.hs - the openFd function signature changed in unix-2.8.x, removing the Maybe FileMode parameter and requiring file creation flags to be passed via OpenFileFlags. The changes ensure files are created with proper permissions when they don't exist.

How should this be manually tested?

  1. Run stack build to verify compilation
  2. Run stack test to verify all test suites pass:
    - haskey-properties - property-based tests
    - haskey-integration - integration tests including file backend tests
    - haskey-example - example usage test

All tests pass successfully with the updated dependencies.

Any background context you want to provide?

The unix package underwent significant API changes in version 2.8.0, where openFd changed from:
openFd :: FilePath -> OpenMode -> Maybe FileMode -> OpenFileFlags -> IO Fd
to:
openFd :: FilePath -> OpenMode -> OpenFileFlags -> IO Fd

File creation mode is now specified via the creat field in OpenFileFlags. Additionally, many imports like Control.Applicative operators are now redundant as they're part of Prelude in modern GHC.

What are the relevant tickets?

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant