Skip to content
  • Ryan Scott's avatar
    4219e9c1
    Make boxed 1-tuples have known keys · 4219e9c1
    Ryan Scott authored
    Unlike other tuples, which use special syntax and are "known" by way
    of a special `isBuiltInOcc_maybe` code path, boxed 1-tuples do not
    use special syntax. Therefore, in order to make sure that the
    internals of GHC are aware of the `data Unit a = Unit a` definition
    in `GHC.Tuple`, we give `Unit` known keys. For the full details, see
    `Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)`
    in `GHC.Builtin.Types`.
    
    Fixes #18097.
    
    (cherry picked from commit 518a63d4)
    4219e9c1
    Make boxed 1-tuples have known keys
    Ryan Scott authored
    Unlike other tuples, which use special syntax and are "known" by way
    of a special `isBuiltInOcc_maybe` code path, boxed 1-tuples do not
    use special syntax. Therefore, in order to make sure that the
    internals of GHC are aware of the `data Unit a = Unit a` definition
    in `GHC.Tuple`, we give `Unit` known keys. For the full details, see
    `Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)`
    in `GHC.Builtin.Types`.
    
    Fixes #18097.
    
    (cherry picked from commit 518a63d4)
Loading