[GHC] #13680: Can't use TypeApplications with [] data constructor

GHC ghc-devs at haskell.org
Mon Jul 10 21:46:58 UTC 2017


#13680: Can't use TypeApplications with [] data constructor
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |             Keywords:
      Resolution:                    |  TypeApplications
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Replying to [comment:9 goldfire]:
 > Happy to take a look at your code if you like.

 Well, that's the thing... the line:

 {{{#!hs
 tcExpr (ExplicitList _ Nothing []) res_ty = tcCheckId nilDataConName
 res_ty
 }}}

 is literally the only change I had to make to make `[] @Int` work. So
 that's nice. But now exactly one GHC test fails: `T12957`.

 {{{
 =====> T12957(normal) 1 of 1 [0, 0, 0]
 cd "./pmcheck/should_compile/T12957.run" &&
 "/home/rgscott/Software/ghc4/inplace/test   spaces/ghc-stage2" -c
 T12957.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-
 missed-specialisations -fshow-warning-groups -fdiagnostics-color=never
 -fno-diagnostics-show-caret -dno-debug-output  -fwarn-overlapping-patterns
 Actual stderr output differs from expected:
 diff -uw "./pmcheck/should_compile/T12957.run/T12957.stderr.normalised"
 "./pmcheck/should_compile/T12957.run/T12957.comp.stderr.normalised"
 --- ./pmcheck/should_compile/T12957.run/T12957.stderr.normalised
 2017-07-10 17:44:06.341225345 -0400
 +++ ./pmcheck/should_compile/T12957.run/T12957.comp.stderr.normalised
 2017-07-10 17:44:06.341225345 -0400
 @@ -1,4 +0,0 @@
 -
 -T12957.hs:4:16: warning: [-Woverlapping-patterns (in -Wdefault)]
 -    Pattern match is redundant
 -    In a case alternative: (_ : _) -> ...
 *** unexpected failure for T12957(normal)
 }}}

 And that's where I'm stuck.

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


More information about the ghc-tickets mailing list