Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,842
    • Issues 4,842
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 454
    • Merge requests 454
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20777

Closed
Open
Created Dec 04, 2021 by Simon Jakobi@sjakobiDeveloper

Undocumented changes to Word64?

When I build bytestring master with GHC HEAD, I get some errors:

Data/ByteString/Builder/RealFloat/Internal.hs:506:13: error:
    • Couldn't match expected type ‘Word64#’ with actual type ‘Word#’
    • In the first argument of ‘W64#’, namely ‘hi’
      In the expression: W64# hi
      In the expression: (W64# hi, W64# lo)
    |
506 |    in (W64# hi, W64# lo)
    |             ^^

Data/ByteString/Builder/RealFloat/Internal.hs:506:22: error:
    • Couldn't match expected type ‘Word64#’ with actual type ‘Word#’
    • In the first argument of ‘W64#’, namely ‘lo’
      In the expression: W64# lo
      In the expression: (W64# hi, W64# lo)
    |
506 |    in (W64# hi, W64# lo)
    |                      ^^

Data/ByteString/Builder/RealFloat/Internal.hs:519:43: error:
    • Couldn't match type ‘Word#’ with ‘Word64#’
      Expected: Word64#
        Actual: WORD64
    • In the first argument of ‘W64#’, namely ‘w’
      In the first argument of ‘dquotRem5’, namely ‘(W64# w)’
      In the expression: dquotRem5 (W64# w)
    |
519 |   let !(W64# q, W64# r) = dquotRem5 (W64# w)
    |                                           ^

Data/ByteString/Builder/RealFloat/Internal.hs:521:12: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the first argument of ‘eqWord#’, namely ‘r’
      In the expression: r `eqWord#` 0##
      In the expression:
        case r `eqWord#` 0## of
          0# -> count
          _ -> pow5_factor q (count +# 1#)
    |
521 |    in case r `eqWord#` 0## of
    |            ^

Data/ByteString/Builder/RealFloat/Internal.hs:526:27: error:
    • Couldn't match type ‘Word64#’ with ‘Word#’
      Expected: WORD64
        Actual: Word64#
    • In the first argument of ‘pow5_factor’, namely ‘q’
      In the expression: pow5_factor q (count +# 1#)
      In a case alternative: _ -> pow5_factor q (count +# 1#)
    |
526 |         _  -> pow5_factor q (count +# 1#)
    |                           ^

Data/ByteString/Builder/RealFloat/Internal.hs:583:24: error:
    • Couldn't match expected type ‘Word#’ with actual type ‘Word64#’
    • In the expression: w
      In an equation for ‘unsafeRaw’: unsafeRaw (W64# w) = w
      In the instance declaration for ‘Mantissa Word64’
    |
583 |   unsafeRaw (W64# w) = w
    |                        ^

Data/ByteString/Builder/RealFloat/Internal.hs:587:18: error:
    • Couldn't match type ‘Word64#’ with ‘Word#’
      Expected: WORD64
        Actual: Word64#
    • In the expression: w
      In an equation for ‘raw’: raw (W64# w) = w
      In the instance declaration for ‘Mantissa Word64’
    |
587 |   raw (W64# w) = w
    |                  ^

I assume this is related to 2800eee2. Could this change please be documented in the ghc-prim changelog and the migration guide?! Cheers!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking