[GHC] #15520: Invalid warning Defined but not used

GHC ghc-devs at haskell.org
Thu Aug 16 10:23:30 UTC 2018


#15520: Invalid warning Defined but not used
-------------------------------------+-------------------------------------
        Reporter:  rik               |                Owner:  (none)
            Type:  bug               |               Status:  infoneeded
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rik):

 Sorry for the delay.

 Complete program:
 {{{#!hs
 {-# LANGUAGE NoImplicitPrelude #-}
 {-# LANGUAGE OverloadedStrings #-}
 module Test(exported) where

 import Protolude

 data U = Text :+++ Text

 x :: U
 x = "ss" :+++ "ss"


 exported :: Bool
 exported = True
 }}}

 Gives warnings:
 {{{

 /Users/rik/siemens/autoencoder/src/Test.hs:7:10: warning: [-Wunused-top-
 binds]
     Defined but not used: data constructor ‘:+++’
   |
 7 | data U = Text :+++ Text
   |          ^^^^^^^^^^^^^^

 Test.hs:10:1: warning: [-Wunused-top-binds]
     Defined but not used: ‘x’
    |
 10 | x = "ss" :+++ "ss"
    | ^
 Ok, one module loaded.
 }}}

 I understand from `x` but not from `:+++`

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


More information about the ghc-tickets mailing list