[Haskell-cafe] ghc-9.2.1 unboxed types compatibility
Viktor Dukhovni
ietf-dane at dukhovni.org
Sat Nov 6 16:58:13 UTC 2021
On Sat, Nov 06, 2021 at 11:15:37AM +0100, Bruno Damour wrote:
> A lot of them are in the process (or already have) of adding
> compatibility layers to allow them to support the new version while
> preserving compatibility with older ones, introducing code like :
>
> #if MIN_VERSION_base(4,16,0)
> word32ToWordCompat# :: Word32# -> Word#
> word32ToWordCompat# = word32ToWord#
> #else
> word32ToWordCompat# :: Word32# -> Word#
> word32ToWordCompat# x = x
> #endif
> for the functions they use (usually a small subset).
>
> Some of the solutions appear to differ.
>
> Is there a preferred way to make this consistently or/and avoid unnecessary code duplication ?
Since the above is what the head.hackage maintainers are doing, I
assumed that's the way to go.
On Sat, Nov 06, 2021 at 01:08:01PM +0100, Bruno Damour wrote:
> ... but I have seen this in:
>
> base16-bytestring
> basement
> streaming-commons
> iproute
> hashtables
>
> So it seems quite widespread… especially as a number of common
> libraries depend on these (persistent for example)
An updated iproute 1.7.12 is now released, using the head.hackage
approach.
--
Viktor.
More information about the Haskell-Cafe
mailing list