
#2893: Implement "Quantified contexts" proposal -------------------------------------+------------------------------------ Reporter: porges | Owner: Type: feature request | Status: new Priority: normal | Milestone: ⊥ Component: Compiler | Version: 6.10.1 Resolution: | Keywords: proposal Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by heisenbug): * cc: ggreif@… (added) Comment: Copying a use-case from #9196: My point is that I'd like to have polymorphic (multiparameter) constraints, where the param universally abstracted over is a non-`*` kind, that is an ADT. See: {{{ class Foo a where ... data Bar (b :: Bool) x = ... instance Foo (Bar True x) where ... instance Foo (Bar False x) where ... test :: (forall b. Foo (Bar b x)) =>... }}} Here the `forall` condition is satisfiable, as all `Bool` alternatives are covered with `instance` declarations. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/2893#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler