Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • 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,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21617
Closed
Open
Created May 23, 2022 by Simon Jakobi@sjakobiDeveloper

Wrapping unlifted datatypes without pointer indirection?!

Say you have an unlifted datatype U

type U :: UnliftedType
data U = U1 | U2 <params> | ...

For better ergonomics, typeclass instances, etc., you also want a lifted wrapper L

data L = L U

Unfortunately it seems that this wrapper would incur an additional pointer indirection, somewhat reducing the benefits of using an unlifted type in the first place.

Is there a way that GHC could provide such lifted wrappers but without incurring a pointer indirection?!

(Background: In unordered-containers we're considering using UnliftedDatatypes for HashMap: https://github.com/haskell-unordered-containers/unordered-containers/issues/463)

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