[GHC] #16220: -Wmissing-signatures should warn when top-level signature is partial
GHC
ghc-devs at haskell.org
Wed Jan 23 16:25:56 UTC 2019
#16220: -Wmissing-signatures should warn when top-level signature is partial
-------------------------------------+-------------------------------------
Reporter: aspiwack | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
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:
-------------------------------------+-------------------------------------
I'd like GHC to emit a warning for the following definition:
{{{#!hs
g :: _
g = True
}}}
But not for that one:
{{{#!hs
f :: Int
f = x
where
x :: _
x = 1
}}}
The context is that I'm using partial signatures to help the type checker
give the right type to a binding, with no intention of filling the holes
later. (what Richard calls elision [https://github.com/ghc-proposals/ghc-
proposals/pull/194 here])
The warning accompanying partial signatures (`-Wpartial-type-signatures`)
effectively treats `_`-s in type signatures as holes which are meant to be
filled (the type-level equivalent of typed holes). Which is not useful to
my usage.
I can deactivate `-Wpartial-type-signatures`, however, it seems to me
that, in that case, a partial top-level signature is just as bad as a
missing top-level signature. So it seems to me that whenever I have
`-Wmissing-signatures` enabled I also want to warn for partial top-level
signatures.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16220>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list