Skip to content

Type operators in existential context cannot be parsed

{-# LANGUAGE TypeOperators, MultiParamTypeClasses, ExistentialQuantification #-}

class a + b

data D1 = forall a b. (a + b) => D1 a b
data D2 = forall a b.  a + b  => D2 a b

The declaration D1 is accepted, while D2 is rejected. There is no reason to reject D2 except for shortcomings of the current grammar.

Trac metadata
Trac field Value
Version 8.4.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information