Skip to content

Incorrect warning about redundant constraints

The following program results in an incorrect warning about a redundant constraint:

{-# LANGUAGE TypeFamilies #-}

type family SomeFun a 

f :: (SomeFun i ~ [a], Read a) => proxy i -> a
f _ = read "HELLO"

This is the warning:

Redundant constraint: SomeFun i ~ [a]
    In the type signature for:
         f :: (SomeFun i ~ [a], Read a) => proxy i -> a

I tried it on GHC version 7.11.20151029

Trac metadata
Trac field Value
Version 7.11
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
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