Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 2, 2025

Summary

This PR replaces the deprecated data-binary-ieee754 package with equivalent functions from GHC.Float (part of the base package). The data-binary-ieee754 package hasn't been updated in over 10 years and is marked as deprecated.

Changes

The following conversions were made:

  • Data.Binary.IEEE754.floatToWordGHC.Float.castFloatToWord32
  • Data.Binary.IEEE754.doubleToWordGHC.Float.castDoubleToWord64
  • Data.Binary.IEEE754.wordToFloatGHC.Float.castWord32ToFloat
  • Data.Binary.IEEE754.wordToDoubleGHC.Float.castWord64ToDouble
  • Data.Binary.IEEE754.getFloat32le → custom getFloat32le using castWord32ToFloat <$> getWord32le
  • Data.Binary.IEEE754.getFloat64le → custom getFloat64le using castWord64ToDouble <$> getWord64le

Testing

All existing tests pass (90/90), including:

  • Float and Double encoding/decoding for single values
  • Float and Double encoding/decoding for packed lists
  • Float and Double encoding/decoding for repeated fields
  • All integration tests

The GHC.Float functions have been available since GHC 7.8 and are part of the standard base package, making this a safe and future-proof replacement.

Fixes #71

Original prompt

This section details on the original issue you should resolve

<issue_title>Replace deprecated data-binary-ieee754 package</issue_title>
<issue_description>Please consider replacing the data-binary-ieee754 package which is deprecated and haven't seen an update in more than 10 years.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #40

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: NathanHowell <170829+NathanHowell@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace deprecated data-binary-ieee754 package Replace deprecated data-binary-ieee754 package with GHC.Float Oct 2, 2025
Copilot AI requested a review from NathanHowell October 2, 2025 03:58
@NathanHowell NathanHowell marked this pull request as ready for review October 2, 2025 03:59
@NathanHowell NathanHowell merged commit 7706523 into master Oct 2, 2025
6 checks passed
@NathanHowell NathanHowell deleted the copilot/fix-74f79a12-f379-43ab-98c3-964344ef7281 branch October 2, 2025 04:16
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.

Replace deprecated data-binary-ieee754 package

2 participants