[GHC] #8540: Template Haskell handling bug in ghc-7.7.20131115 ?

GHC ghc-devs at haskell.org
Fri Nov 22 21:50:01 UTC 2013


#8540: Template Haskell handling bug in ghc-7.7.20131115 ?
-------------------------------------+------------------------------------
        Reporter:  awson             |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Runtime crash     |       Difficulty:  Unknown
       Test Case:  th/T8540          |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by nomeata):

 * status:  closed => new
 * resolution:  fixed =>


Comment:

 I believe this change causes test failures to fail with assertions (at
 least it touches the location of the assertion):

 {{{
 =====> print019(ghci) 2936 of 3831 [0, 0, 0]
 cd ./ghci.debugger/scripts && HC='/home/jojo/build/haskell/ghc/inplace/bin
 /ghc-stage2' HC_OPTS='-dcore-lint -dcmm-lint -dno-debug-output -no-user-
 package-db -rtsopts -fno-ghci-history '
 '/home/jojo/build/haskell/ghc/inplace/bin/ghc-stage2' --interactive -v0
 -ignore-dot-ghci -dcore-lint -dcmm-lint -dno-debug-output -no-user-
 package-db -rtsopts -fno-ghci-history  -ignore-dot-ghci   <print019.script
 >print019.run.stdout 2>print019.run.stderr
 Actual stderr output differs from expected:
 --- ./ghci.debugger/scripts/print019.stderr     2013-09-13
 20:58:44.089042446 +0100
 +++ ./ghci.debugger/scripts/print019.run.stderr 2013-11-22
 21:47:09.304630865 +0000
 @@ -1,12 +1,9 @@
 +ghc-stage2: panic! (the 'impossible' happened)
 +  (GHC version 7.7.20131108 for x86_64-unknown-linux):
 +       ASSERT failed!
 +    file compiler/typecheck/TcEnv.lhs line 467
 +    it{v a1C8} [lid]
 +    a1{tv a1w5} [rt]
 +
 +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 -<interactive>:11:1:
 -    No instance for (Show a1) arising from a use of ‛print’
 -    Cannot resolve unknown runtime type ‛a1’
 -    Use :print or :force to determine these types
 -    Relevant bindings include it :: a1 (bound at <interactive>:11:1)
 -    Note: there are several potential instances:
 -      instance Show a => Show (List1 a) -- Defined at ../Test.hs:11:12
 -      instance Show MyInt -- Defined at ../Test.hs:14:16
 -      instance Show a => Show (MkT a) -- Defined at ../Test.hs:17:13
 -      ...plus 32 others
 -    In a stmt of an interactive GHCi command: print it
 *** unexpected failure for print019(ghci)
 =====> break003(ghci) 2955 of 3831 [0, 1, 0]
 cd ./ghci.debugger/scripts && HC='/home/jojo/build/haskell/ghc/inplace/bin
 /ghc-stage2' HC_OPTS='-dcore-lint -dcmm-lint -dno-debug-output -no-user-
 package-db -rtsopts -fno-ghci-history '
 '/home/jojo/build/haskell/ghc/inplace/bin/ghc-stage2' --interactive -v0
 -ignore-dot-ghci -dcore-lint -dcmm-lint -dno-debug-output -no-user-
 package-db -rtsopts -fno-ghci-history  -ignore-dot-ghci   <break003.script
 >break003.run.stdout 2>break003.run.stderr
 Actual stderr output differs from expected:
 --- ./ghci.debugger/scripts/break003.stderr     2013-09-02
 15:07:33.148355402 +0100
 +++ ./ghci.debugger/scripts/break003.run.stderr 2013-11-22
 21:47:09.528630856 +0000
 @@ -1,4 +1,9 @@
 +ghc-stage2: panic! (the 'impossible' happened)
 +  (GHC version 7.7.20131108 for x86_64-unknown-linux):
 +       ASSERT failed!
 +    file compiler/typecheck/TcEnv.lhs line 467
 +    it{v aR1} [lid]
 +    t{tv IQD} [rt] -> t1{tv IQE} [rt]
 +
 +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 -<interactive>:5:1:
 -    No instance for (Show (t -> t1)) arising from a use of ‛print’
 -    In a stmt of an interactive GHCi command: print it
 *** unexpected failure for break003(ghci)
 =====> break006(ghci) 2957 of 3831 [0, 2, 0]
 cd ./ghci.debugger/scripts && HC='/home/jojo/build/haskell/ghc/inplace/bin
 /ghc-stage2' HC_OPTS='-dcore-lint -dcmm-lint -dno-debug-output -no-user-
 package-db -rtsopts -fno-ghci-history '
 '/home/jojo/build/haskell/ghc/inplace/bin/ghc-stage2' --interactive -v0
 -ignore-dot-ghci -dcore-lint -dcmm-lint -dno-debug-output -no-user-
 package-db -rtsopts -fno-ghci-history  -ignore-dot-ghci   <break006.script
 >break006.run.stdout 2>break006.run.stderr
 Actual stderr output differs from expected:
 --- ./ghci.debugger/scripts/break006.stderr     2013-09-13
 20:58:44.085042446 +0100
 +++ ./ghci.debugger/scripts/break006.run.stderr 2013-11-22
 21:47:09.764630848 +0000
 @@ -1,26 +1,33 @@
 +ghc-stage2: panic! (the 'impossible' happened)
 +  (GHC version 7.7.20131108 for x86_64-unknown-linux):
 +       ASSERT failed!
 +    file compiler/typecheck/TcEnv.lhs line 467
 +    it{v aX8} [lid]
 +    t1{tv IWQ} [rt]
 +
 +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 +
 +ghc-stage2: panic! (the 'impossible' happened)
 +  (GHC version 7.7.20131108 for x86_64-unknown-linux):
 +       ASSERT failed!
 +    file compiler/typecheck/TcEnv.lhs line 467
 +    y{v aYb} [lid]
 +    t1{tv IWQ} [rt]
 +
 +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 +
 +
 +<interactive>:8:1: Not in scope: ‛y’
 +
 +Top level: Not in scope: ‛y’
 +
 +Top level: Not in scope: ‛y’
 +ghc-stage2: panic! (the 'impossible' happened)
 +  (GHC version 7.7.20131108 for x86_64-unknown-linux):
 +       ASSERT failed!
 +    file compiler/typecheck/TcEnv.lhs line 467
 +    it{v aYm} [lid]
 +    t1{tv IWQ} [rt]
 +
 +Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 -<interactive>:6:1:
 -    No instance for (Show t1) arising from a use of ‛print’
 -    Cannot resolve unknown runtime type ‛t1’
 -    Use :print or :force to determine these types
 -    Relevant bindings include it :: t1 (bound at <interactive>:6:1)
 -    Note: there are several potential instances:
 -      instance Show Double -- Defined in ‛GHC.Float’
 -      instance Show Float -- Defined in ‛GHC.Float’
 -      instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
 -        -- Defined in ‛GHC.Real’
 -      ...plus 24 others
 -    In a stmt of an interactive GHCi command: print it
 -
 -<interactive>:8:1:
 -    No instance for (Show t1) arising from a use of ‛print’
 -    Cannot resolve unknown runtime type ‛t1’
 -    Use :print or :force to determine these types
 -    Relevant bindings include it :: t1 (bound at <interactive>:8:1)
 -    Note: there are several potential instances:
 -      instance Show Double -- Defined in ‛GHC.Float’
 -      instance Show Float -- Defined in ‛GHC.Float’
 -      instance (Integral a, Show a) => Show (GHC.Real.Ratio a)
 -        -- Defined in ‛GHC.Real’
 -      ...plus 24 others
 -    In a stmt of an interactive GHCi command: print it
 Actual stdout output differs from expected:
 --- ./ghci.debugger/scripts/break006.stdout     2013-09-02
 15:07:33.148355402 +0100
 +++ ./ghci.debugger/scripts/break006.run.stdout 2013-11-22
 21:47:09.760630848 +0000
 @@ -9,12 +9,7 @@
  x :: Integer = 1
  f :: Integer -> t1 = _
  _result :: [t1] = _
 -y = (_t1::t1)
 -y = 2
  xs :: [Integer] = [2,3]
  x :: Integer = 1
 -f :: Integer -> Integer = _
 -_result :: [Integer] = _
 -y :: Integer = 2
 -_t1 :: Integer = 2
 -2
 +f :: Integer -> t1 = _
 +_result :: [t1] = _
 *** unexpected failure for break006(ghci)

 Unexpected results from:
 TEST="break006 break003 print019"
 }}}

 (I hope this “but it breaks my `-DDEBUG`” barfing is not too annoying...)

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


More information about the ghc-tickets mailing list