Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,269
    • Issues 4,269
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 413
    • Merge Requests 413
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19026

Closed
Open
Opened Dec 03, 2020 by Ben Gamari@bgamari🐢Maintainer0 of 7 tasks completed0/7 tasks

Finish the sized primitives work

For a long time GHC had no first-class sized integer types. While Word8 existed, it was merely a wrapper around Word# with the invariant that the value was a byte. This changed in 2c959a18 and 36fcf9ed with the introduction of {Word,Int}{16,32}#, giving us a full complement of sized integer types.

In !4390 (closed) we adjusted the lifted Data.Int and Data.Word types to use their sized unlifted types (e.g. Word8#) instead of their word-sized brethren (e.g. Word#). However, this is just the first step of this process. There are a variety of knock-on effects that will also need to be pushed forward,

  • readWord8OffAddr# and friends still return unsized results (!4492)
  • indexWord8OffAddr# and friends still return unsized results (!4492)
  • writeWord8OffAddr# and friends still take unsized arguments (!4492)
  • the type mappings INT_VECTOR_TYPES and WORD_VECTOR_TYPES defined in primops.txt.pp still used unsized types (!4492)
  • the ByteArray# operations still use unsized types (!4492)
  • we do not have binary operations (e.g. +#, and#) for the sized types (!4717)

Also

  • 64-bit types are annoying to work with because CPP. (!3658, has its own issues too.)
Edited Jan 09, 2021 by John Ericson
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#19026