
#8883: FlexibleContexts checking should happen also on inferred signature ------------------------------------------------+-------------------------- Reporter: Blaisorblade | Owner: Type: bug | jstolarek Priority: normal | Status: closed Component: Compiler | Milestone: Resolution: fixed | Version: 7.6.3 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: typecheck/should_fail/T8883 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by Lemming): Replying to [comment:17 simonpj]:
I can't get terribly excited about this decision; but I can see the logic, and I'll gladly change the current behaviour if there is support for doing so. (This would affect both inferred and declared types, of course.)
As I said, you cannot eliminate all `FlexibleContexts` using an auxiliary variable. You cannot convert {{{class (Functor (PF a)) => C a where}}} to {{{class (Functor b, b ~ PF a) => C a where}}} because you cannot introduce the variable `b` in the superclass constraint. Thus features provided by `FlexibleContexts` cannot always be achieved by `TypeFamilies`, and thus `FlexibleContexts` should not be a "superfeature" of `TypeFamilies`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8883#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler