[GHC] #8044: "Inaccessible code" error reported in wrong place

GHC ghc-devs at haskell.org
Sat Nov 22 02:37:33 UTC 2014


#8044: "Inaccessible code" error reported in wrong place
-------------------------------------+-------------------------------------
              Reporter:  goldfire    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.7
  (Type checker)                     |         Keywords:  GADTs
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * milestone:   => 7.10.1


Comment:

 This seems to be fixed. A regression test should probably be added. HEAD
 now shows an error message about the second clause of `frob`, no longer
 about the first clause.

 {{{
 $ ghc-7.9.20141121 Bug.hs
 [1 of 1] Compiling Bug              ( Bug.hs, Bug.o )

 Bug.hs:16:13:
     Couldn't match type ‘Frob a’ with ‘Char’
     Expected type: X (Frob a)
       Actual type: X Char
     Relevant bindings include
       frob :: X a -> X (Frob a) (bound at Bug.hs:15:1)
     In the expression: XChar
     In an equation for ‘frob’: frob _ = XChar
 }}}

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


More information about the ghc-tickets mailing list