Quantified contexts

This wiki page summarises the state of play on the idea of allowing quantification in class contexts. For example

data Rose f a = Branch a (f (Rose f a))

instance (Eq a, forall b. (Eq b) => Eq (f b))
       => Eq (Rose f a)
  where ...

The new bit is the forall in the context of the instance declaration.

Here are some resources

  • #2893, a ticket about the idea


Use Keyword = QuantifiedContexts to ensure that a ticket ends up on these lists.

Open Tickets:

Implement "Quantified contexts" proposal
Add (->) representation and the Invariant class to GHC.Generics
Need for higher kinded roles
Several Traversable instances have an extra fmap
Allow ‘unsafe’ deriving strategy, deriving code with ‘unsafeCoerce’
Solve Coercible constraints over type constructors

Closed Tickets: No results

Last modified 4 months ago Last modified on Aug 1, 2017 3:53:31 PM