[GHC] #10662: GHC warning shows technical summary of AST instead of the user's code
GHC
ghc-devs at haskell.org
Mon Jul 20 09:19:47 UTC 2015
#10662: GHC warning shows technical summary of AST instead of the user's code
-------------------------------------+-------------------------------------
Reporter: kolmodin | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.2-rc2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
I got a warning for some code I wrote;
{{{#!hs
forkIO (....)
}}}
Naturally GHC warns me that I'm throwing away the result, and should write
like this;
{{{#!hs
_ <- forkIO (...)
}}}
However, the warning is expressed in a somewhat confusing way, not sure
this is intentional.
{{{
examples/route_guide_client.hs:84:5: Warning:
A do-notation statement discarded a result of type ‘ThreadId’
Suppress this warning by saying
‘_ <- ($)
forkIO
let
AbsBinds [] []
{Exports: [go <= go
<>]
Exported types: go :: [L.ByteString] -> IO ()
[LclId, Str=DmdType]
Binds: go acc = ...}
in go []’
or by using the flag -fno-warn-unused-do-bind
}}}
I find it confusing that the warning mentions AbsBinds, exports and types.
I'd expect a snippet of my code in the warning.
However, doesn't look like this is a (recent) regression. The same happens
GHC 7.8.4 and 7.10.1.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10662>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list