Skip to content

Bad representation-polymorphic desugaring with `noinline`

Summary

Attempting to compile the following program with ghc-9.4.2 results in a panic:

{-# LANGUAGE UnboxedTuples #-}
module Test where
import GHC.Exts (noinline)

test :: a -> b -> (# a, b #)
test = noinline (#,#)

Running with -dlint makes clear that the special desugaring for noinline has separated (#,#) from its type arguments, resulting in its value arguments no longer having fixed representation.

Environment

  • GHC version used: 9.4.2
Edited by sheaf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information