haskell / haskell/stylish-haskell

parse error on constrained record gadt

Open
#183 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.