konsumlamm
konsumlamm
To fix the CI job for 9.0, the cache must be cleared. I don't have the permissions to do so.
Version 0.9.1.0 has been released to Hackage, see https://hackage.haskell.org/package/primitive-0.9.1.0.
> The most obvious name would be `Data.Float`, but maybe someone else has a better idea. A better idea might be to do what MicroHs does: Add `Data.Float` for `Float`...
I opened a [draft MR](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15342), adding the new modules `Data.Double` (exporting `Double`, `castWord64ToDouble`, `castDoubleToWord64`) and `Data.Float` (exporting `Float`, `castWord32ToFloat`, `castFloatToWord32`). I'd appreciate any feedback!
> If these are really zero-cost casts then this is pinning down the exact binary layout of floats. We might want to do that, but we should do so consciously...
I'm not so sure this is UB, at least as long as the size and alignment match.
Note that adding the casting functions doesn't require `Float` and `Double` to be represented according to IEEE 754, it just allows users to access the internal representation..
@noughtmare > I foresee many people using these functions will assume IEEE754 layout. If this function does not promise IEEE754 we should be very explicit about that. I think it...