[GHC] #10347: Spurious "unused constructor" warning with Coercible

GHC ghc-devs at haskell.org
Thu Apr 23 14:44:23 UTC 2015


#10347: Spurious "unused constructor" warning with Coercible
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                   Owner:  goldfire
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 In the example how could you ever construct a value of type `N a` (other
 than bottom)?

 You might add:
 {{{
 makeN :: Int -> N a
 makeN = N
 }}}
 and bingo you've used `N`.

 So actually the error message seems somewhat reasonable to me.

 Simon

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


More information about the ghc-tickets mailing list