[GHC] #10642: Coercible regression from 7.10 to HEAD

GHC ghc-devs at haskell.org
Wed Jul 15 17:24:26 UTC 2015


#10642: Coercible regression from 7.10 to HEAD
-------------------------------------+-------------------------------------
        Reporter:  darchon           |                   Owner:  goldfire
            Type:  bug               |                  Status:  closed
        Priority:  highest           |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.11
      Resolution:  fixed             |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |               Test Case:
      Blocked By:                    |  typecheck/should_compile/T10642
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by darchon):

 `Bounded` is not derivable in the standard way for the `D` type, it needs
 `StandaloneDeriving`, which for newtypes seems to *always* use `coerce`.

 As to why `Eq` didnt trigger the bug, is has to do with the fact that:

 {{{
 coerceDF :: (F a -> Int) -> (D a -> Int)
 coerceDF = coerce
 }}}

 also didn't trigger the bug.

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


More information about the ghc-tickets mailing list