{-# 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 .....
this program:
gives a parse error in hlint on the line
foo :: forall v f .....