Currently, bytes defines functions to convert from floating-point values to word values (and vice versa) in i2d.c. However, in base-4.10.0.0 (GHC 8.2) and later, the GHC.Float module offers equivalent functionality in the castDoubleToWord64 function, as well as its cohorts. As far as I can tell, these functions are bit-for-bit compatible, although I'd have to stare at the corresponding Cmm code to know for sure.
If we used the GHC.Float functions instead, we would no longer need to link against C code on recent versions of GHC. This has come up elsewhere in ekmett/bits#7 (comment).
Currently,
bytesdefines functions to convert from floating-point values to word values (and vice versa) ini2d.c. However, inbase-4.10.0.0(GHC 8.2) and later, theGHC.Floatmodule offers equivalent functionality in thecastDoubleToWord64function, as well as its cohorts. As far as I can tell, these functions are bit-for-bit compatible, although I'd have to stare at the corresponding Cmm code to know for sure.If we used the
GHC.Floatfunctions instead, we would no longer need to link against C code on recent versions of GHC. This has come up elsewhere in ekmett/bits#7 (comment).