#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):


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 18 months 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 18 months ago by simonpj

  • Status changed from new to merge
  • Test Case set to 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 18 months ago by thoughtpolice

  • Milestone set to 7.8.2

comment:4 Changed 18 months ago by thoughtpolice

  • Milestone changed from 7.8.2 to 7.8.3

comment:5 Changed 18 months ago by thoughtpolice

  • Resolution set to fixed
  • Status changed from merge to closed

Merged to 7.8.

Note: See TracTickets for help on using tickets.