Opened 5 years ago

Closed 5 years ago

#8954 closed bug (fixed)

Reifying the nullary unboxed tuple is broken

Reported by: goldfire Owned by:
Priority: low Milestone: 7.8.3
Component: Template Haskell Version: 7.8.1-rc2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: th/T8954
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Here is my code:

{-# LANGUAGE TemplateHaskell, UnboxedTuples #-}

module Bug where

import Language.Haskell.TH

$( do _ <- reify ''(##)
      return [] )

And here is GHC's response:

    Can't find interface-file declaration for type constructor or class GHC.Prim.(##)
      Probable cause: bug in .hi-boot file, or inconsistent .hi file
      Use -ddump-if-trace to get an idea of which file caused the error

Non-nullary unboxed tuples behave fine. This behavior is the same whether or not there is a space in the nullary unboxed tuple.

Believe me -- I actually was just bit by this bug. I'm happy to fix, but could someone give me a pointer as to where the problem might be? I have the feeling someone reading this will know quite quickly.

Change History (5)

comment:1 Changed 5 years ago by Simon Peyton Jones <simonpj@…>

In 750271e61bdbaad50c19176406512e79abe404a8/ghc:

Simplify and tidy up the handling of tuple names

This fixes Trac #8954.

There were actually three places where tuple occ-names
were parsed:
  - IfaceEnv.lookupOrigNameCache
  - Convert.isBuiltInOcc
  - OccName.isTupleOcc_maybe

I combined all three into TysWiredIn.isBuiltInOcc_maybe
Much nicer.

comment:2 Changed 5 years ago by simonpj

Status: newmerge
Test Case: th/T8954

I did this, happily simplifying things as I went.

Merge to 7.8.2, but not worth it for 7.8.1

comment:3 Changed 5 years ago by thoughtpolice

Milestone: 7.8.2

comment:4 Changed 5 years ago by thoughtpolice


comment:5 Changed 5 years ago by thoughtpolice

Resolution: fixed
Status: mergeclosed

Merged to 7.8.

Note: See TracTickets for help on using tickets.