Skip to content

Partial type signatures generate typed hole warnings

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".

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information