Make boxed 1-tuples have known keys
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.
Showing
- compiler/GHC/Builtin/Names.hs 4 additions, 0 deletionscompiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs 36 additions, 4 deletionscompiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Utils.hs 8 additions, 4 deletionscompiler/GHC/Builtin/Utils.hs
- testsuite/tests/th/T18097.hs 14 additions, 0 deletionstestsuite/tests/th/T18097.hs
- testsuite/tests/th/all.T 1 addition, 0 deletionstestsuite/tests/th/all.T
- testsuite/tests/typecheck/should_compile/holes.stderr 1 addition, 0 deletionstestsuite/tests/typecheck/should_compile/holes.stderr
- testsuite/tests/typecheck/should_compile/holes3.stderr 1 addition, 0 deletionstestsuite/tests/typecheck/should_compile/holes3.stderr
Loading
Please register or sign in to comment