[GHC] #14217: Interface-file decls for large tuples

GHC ghc-devs at haskell.org
Tue Sep 12 18:38:10 UTC 2017


#14217: Interface-file decls for large tuples
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.2.2
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * priority:  normal => high
 * milestone:   => 8.2.2


Comment:

 Thanks crockeea, thanks was tremendously helpful. It turns out you can
 also trigger this error with this program (which has no external
 dependencies):

 {{{#!hs
 {-# LANGUAGE PartialTypeSignatures #-}
 {-# OPTIONS_GHC -Wno-partial-type-signatures #-}
 module Bug where

 data Foo  a1  a2  a3  a4  a5  a6  a7  a8  a9 a10
          a11 a12 a13 a14 a15 a16 a17 a18 a19 a20
          a21 a22 a23 a24 a25 a26 a27 a28 a29 a30
          a31 a32 a33 a34 a35 a36 a37 a38 a39 a40
          a41 a42 a43 a44 a45 a46 a47 a48 a49 a50
          a51 a52 a53 a54 a55 a56 a57 a58 a59 a60
          a61 a62 a63
  = MkFoo  a1  a2  a3  a4  a5  a6  a7  a8  a9 a10
          a11 a12 a13 a14 a15 a16 a17 a18 a19 a20
          a21 a22 a23 a24 a25 a26 a27 a28 a29 a30
          a31 a32 a33 a34 a35 a36 a37 a38 a39 a40
          a41 a42 a43 a44 a45 a46 a47 a48 a49 a50
          a51 a52 a53 a54 a55 a56 a57 a58 a59 a60
          a61 a62 a63
  deriving Eq

 eqFoo :: _
       => Foo  a1  a2  a3  a4  a5  a6  a7  a8  a9 a10
              a11 a12 a13 a14 a15 a16 a17 a18 a19 a20
              a21 a22 a23 a24 a25 a26 a27 a28 a29 a30
              a31 a32 a33 a34 a35 a36 a37 a38 a39 a40
              a41 a42 a43 a44 a45 a46 a47 a48 a49 a50
              a51 a52 a53 a54 a55 a56 a57 a58 a59 a60
              a61 a62 a63
       -> Foo  a1  a2  a3  a4  a5  a6  a7  a8  a9 a10
              a11 a12 a13 a14 a15 a16 a17 a18 a19 a20
              a21 a22 a23 a24 a25 a26 a27 a28 a29 a30
              a31 a32 a33 a34 a35 a36 a37 a38 a39 a40
              a41 a42 a43 a44 a45 a46 a47 a48 a49 a50
              a51 a52 a53 a54 a55 a56 a57 a58 a59 a60
              a61 a62 a63
       -> Bool
 eqFoo = (==)
 }}}
 {{{
 $ /opt/ghc/8.2.1/bin/ghci Bug.hs
 GHCi, version 8.2.1: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Bug              ( Bug.hs, interpreted )

 Bug.hs:37:1: error:
     Can't find interface-file declaration for type constructor or class
 GHC.Classes.(%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%)
       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
    |
 37 | eqFoo = (==)
    | ^^^^^^^^^^^^
 }}}

 As you observed, this error does not occur in GHC 8.0.1 or 8.0.2, so this
 is a regression. I'll bump the priority accordingly.

 (Interestingly, 63 appears to be the minimum constraint tuple size that
 GHC complains about, since removing `a63` from `Foo` causes it to compile
 again.)

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14217#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list