[GHC] #8262: Ill-kinded value is not rejected immediately

GHC ghc-devs at haskell.org
Tue Sep 10 23:04:46 CEST 2013


#8262: Ill-kinded value is not rejected immediately
------------------------------------------------+--------------------------
        Reporter:  monoidal                     |            Owner:
            Type:  bug                          |  simonpj
        Priority:  low                          |           Status:  closed
       Component:  Compiler (Type checker)      |        Milestone:
      Resolution:  fixed                        |          Version:  7.7
Operating System:  Unknown/Multiple             |         Keywords:
 Type of failure:  GHC accepts invalid program  |     Architecture:
       Test Case:  typecheck/should_fail/T8262  |  Unknown/Multiple
        Blocking:                               |       Difficulty:
                                                |  Unknown
                                                |       Blocked By:
                                                |  Related Tickets:
------------------------------------------------+--------------------------

Comment (by nomeata):

 It seems that the test does not reflect the latest state of the error
 message:

 {{{
 =====> T8262(normal) 1047 of 3757 [0, 0, 0]
 cd ./typecheck/should_fail && '/home/jojo/build/haskell/ghc/inplace/bin
 /ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-
 user-package-db -rtsopts -fno-ghci-history -c T8262.hs
 >T8262.comp.stderr 2>&1
 Actual stderr output differs from expected:
 --- ./typecheck/should_fail/T8262.stderr        2013-09-10
 20:00:51.900811113 +0200
 +++ ./typecheck/should_fail/T8262.comp.stderr   2013-09-10
 22:56:47.636429053 +0200
 @@ -1,12 +1,10 @@
 -ghc-stage1: panic! (the 'impossible' happened)
 -  (GHC version 7.7.20130829 for x86_64-unknown-linux):
 -       ASSERT failed!
 -    file compiler/coreSyn/MkCore.lhs line 303
 -    Sym cobox{v dfK} [lid]
 -    ghc-prim:GHC.Prim.Int#{(w) tc 3G}
 -    a{tv afq} [tv]
 -    ghc-prim:GHC.Prim.#{(w) tc 34j}
 -    ghc-prim:GHC.Prim.*{(w) tc 34d}
 -
 -Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 +T8262.hs:5:15:
 +    Kind incompatibility when matching types:
 +      a :: *
 +      GHC.Prim.Int# :: #
 +    Relevant bindings include
 +      foo :: t -> Maybe a (bound at T8262.hs:5:1)
 +    In the first argument of ‛Just’, namely ‛(1#)’
 +    In the expression: Just (1#)
 +    In an equation for ‛foo’: foo x = Just (1#)
 *** unexpected failure for T8262(normal)
 }}}

 Also, the fix for #8233 seems to require a
 {{{
 make -C testsuite accept "TEST=Overlap11"
 }}}

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



More information about the ghc-tickets mailing list