Concrete syntax for pattern synonym type signatures

Dr. ERDI Gergo gergo at
Mon Nov 10 16:50:46 UTC 2014

On Mon, 10 Nov 2014, Richard Eisenberg wrote:

>> pattern P :: forall a. Num a => forall c. (Eq a, Ord Bool, Show c) => c -> Bool -> T a Bool
>> pattern C :: (Eq b, Num b) => () => b -> c -> X Maybe (Maybe b)
> Of course, you can drop the `forall`s in `P`'s type.
> This has, I believe, several advantages over the other order:
> - If you write the `forall`s in, the scope builds left to right. In the 
> other order, the scoping is very bizarre.

I am by now convinced that allowing two separate sets of `forall`s is 
overkill, we don't need the extra specificity. One `forall` with a mixed 
bag of type variables should be enough.

More information about the ghc-devs mailing list