[GHC] #13976: Defined but not used warning on records used by servant-client

#13976: Defined but not used warning on records used by servant-client -------------------------------------+------------------------------------- Reporter: matthewleon | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When generating an HTTP client through the servant-client lib (https://hackage.haskell.org/package/servant-client), if the various API record accessors go unused elsewhere, -Wunused-top-binds will generate warnings of the style "Defined but not used: `{accessor}`. I believe this is somewhat misleading, as the accessors are indeed "used" in the process of generating the client. Some sample code that will generate a warning for the `release` accessor: {{{ type API = "release" :> Capture "mbid" Mbid :> Get '[JSON] Listing type Mbid = UUID data Listing = Listing { release :: Text } deriving (Show, Generic) instance FromJSON Listing coverArtArchiveAPI :: Proxy API coverArtArchiveAPI = Proxy getListing :: Mbid -> ClientM Listing getListing = client coverArtArchiveAPI }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13976 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13976: Defined but not used warning on records used by servant-client -------------------------------------+------------------------------------- Reporter: matthewleon | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13919 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13919 Comment: This is basically the same issue as #13919, so I'll close this as a duplicate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13976#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC