Skip to content

parse error with -XQuantifiedConstraints #433

@ghorn

Description

@ghorn

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 .....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions