haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

parse error with -XQuantifiedConstraints #433

Open ghorn opened 5 years ago

ghorn commented 5 years ago

this program:

{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}

import GHC.Exts ( Constraint )
import qualified Data.Vector.Generic as V
import Data.Proxy ( Proxy )

data Arrays f
  = Arrays
    { arrayBool :: f Bool
    , arrayDouble :: f Double
    }

class SomeClass a where
  type SomeTypeFam (x :: (* -> *) -> *) a :: Constraint
  type SomeTypeFam x a = ()

foo :: forall v f . (forall a. SomeTypeFam Arrays a => V.Vector v (f a)) => Proxy v -> Proxy f -> ()
foo = undefined

gives a parse error in hlint on the line foo :: forall v f .....

ghorn commented 5 years ago

Downstream issue here https://github.com/ndmitchell/hlint/issues/632