stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

parse error on constrained record gadt

Open qdbp opened this issue 6 years ago • 1 comments

stylish-haskell fails on the following:

{-# LANGUAGE GADTs #-}

data Foo a where
    Foo :: (Eq a) => {
            fooBar :: [a],
            fooBaz :: Int
        } -> Foo a

main = putStrLn "foo"

with this error: Language.Haskell.Stylish.Parse.parseModule: could not parse fail.hs: ParseFailed (SrcLoc "<unknown>.hs" 4 22) "Parse error: {"

It works if I remove the (Eq a) constraint. Ghc is able to compile this file properly, so I assume it's a stylish-haskell error.

qdbp avatar Oct 01 '17 15:10 qdbp

Any update on this? @jaspervdj

JoeMShanahan avatar Dec 18 '19 04:12 JoeMShanahan