[GHC] #10224: Partial type signatures generate typed hole warnings
GHC
ghc-devs at haskell.org
Tue Mar 31 22:36:25 UTC 2015
#10224: Partial type signatures generate typed hole warnings
-------------------------------------+-------------------------------------
Reporter: quchen | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
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: |
-------------------------------------+-------------------------------------
GHCi generates typed hole warnings in type signatures even when
PartialTypeSignatures is enabled:
{{{
> :set -XPartialTypeSignatures
> :t (==) :: Char -> _
<interactive>:1:17: Warning:
Found hole ‘_’ with type: Char -> Bool
In an expression type signature: Char -> _
In the expression: (==) :: Char -> _
(==) :: Char -> _ :: Char -> Char -> Bool
> :set -XNoPartialTypeSignatures
> :t (==) :: Char -> _
<interactive>:1:17:
Found hole ‘_’ with type: Char -> Bool
To use the inferred type, enable PartialTypeSignatures
In an expression type signature: Char -> _
In the expression: (==) :: Char -> _
}}}
Similarly, GHC 7.10.1, when given the following source,
{{{
{-# LANGUAGE PartialTypeSignatures #-}
f = (==) :: Char -> _
main = return ()
}}}
mentions that it "found a hole".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10224>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list