brittany icon indicating copy to clipboard operation
brittany copied to clipboard

brittany 0.12 doesn't recognised strictness annotations in GADTs

Open infinity0 opened this issue 6 years ago • 1 comments

$ cat Test.hs
{-# LANGUAGE GADTs #-}
data X where
  X :: !Int -> X

main :: IO ()
main = pure ()
$ brittany Test.hs
ERROR: brittany pretty printer returned syntactically invalid result.
70
$ brittany --version
brittany version 0.12.0.0
Copyright (C) 2016-2018 Lennart Spitzner
There is NO WARRANTY, to the extent permitted by law.

infinity0 avatar Oct 30 '19 18:10 infinity0

This very likely is the same underlying issue as #242, so

  • this comes down to a bug in ghc-exactprint (https://github.com/alanz/ghc-exactprint/issues/79).
  • Does not appear wtih ghc<8.6.

(We really want our own GADT layouting to avoid this ..)

lspitzner avatar Oct 31 '19 14:10 lspitzner