[GHC] #12810: -Wredundant-constraints doesn't factor in associated type families
GHC
ghc-devs at haskell.org
Sat Nov 5 20:56:41 UTC 2016
#12810: -Wredundant-constraints doesn't factor in associated type families
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
Well type families are allowed to not reduce. For example
{{{
*M> :t undefined :: T Int
undefined :: T Int :: T Int
}}}
there's nothing stopping you from writing `T Int`, regardless of whether
there is an instance `C Int`. So GHC's warning is consistent with that.
In your comment, the problem doesn't seem to be the type family, but
rather the lack of any methods. An empty class body gives the same
warning.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12810#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list