bytestring-mmap-compat: mmap support for strict ByteStrings (unix >= 2.8 fork)

[ bsd3, library, system ] [ Propose Tags ] [ Report a vulnerability ]

A fork of bytestring-mmap that compiles against unix >= 2.8.

The original package (Don Stewart, last uploaded 2011) calls System.Posix.openFd with the pre-2.8 four-argument signature. Upstream is unmaintained and the latest Hackage revision restricts the unix bound to < 2.8, which makes the package unusable in package sets that pull in a newer unix transitively.

This fork adds a tiny System.Posix.IO.Compat shim that selects the right openFd signature via CPP and widens the unix bound, leaving the public API (System.IO.Posix.MMap, System.IO.Posix.MMap.Lazy) byte-for-byte compatible with the upstream.

The package name is suffixed with -compat so it can coexist on Hackage with the original; switch back to upstream bytestring-mmap once it adopts a compatible openFd call site.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.3
Change log CHANGELOG.md
Dependencies base (>=4.14 && <5), bytestring (>=0.10 && <0.13), unix (>=2.7 && <2.9) [details]
Tested with ghc ==9.6.6
License BSD-3-Clause
Copyright (c) Don Stewart 2008-2011, (c) Anton Gushcha 2024-2026
Author Don Stewart
Maintainer Anton Gushcha <ncrashed@gmail.com>
Uploaded by NCrashed at 2026-06-08T13:19:48Z
Category System
Home page https://github.com/NCrashed/bytestring-mmap-compat
Bug tracker https://github.com/NCrashed/bytestring-mmap-compat/issues
Source repo head: git clone https://github.com/NCrashed/bytestring-mmap-compat.git
Distributions
Downloads 0 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-06-08 [all 1 reports]

Readme for bytestring-mmap-compat-0.2.3

[back to package description]

bytestring-mmap-compat

A fork of bytestring-mmap that compiles against unix >= 2.8.

Why this exists

The original bytestring-mmap (Don Stewart, last Hackage upload in 2011) calls System.Posix.openFd with the pre-2.8 four-argument signature. Upstream is unmaintained, and the latest Hackage revision caps the unix bound at < 2.8, which leaves the package unusable in any package set that pulls in a newer unix transitively.

This fork:

  • Adds a tiny System.Posix.IO.Compat shim that selects the right openFd signature via CPP.
  • Widens the unix bound to cover both old and new signatures.
  • Modernises the cabal file (cabal-version 2.0, sensible base / bytestring bounds).

The public API (System.IO.Posix.MMap, System.IO.Posix.MMap.Lazy) is byte-for-byte compatible with the upstream; the only difference is the package name.

When to switch back to upstream

When (or if) upstream adopts a compatible openFd call site, switch your build-depends from bytestring-mmap-compat to bytestring-mmap and remove this dependency. No source-level changes required.

Credit

All non-trivial code is by Don Stewart. This fork only adds the Compat shim and updates packaging metadata.

License

BSD3; see LICENSE.