Open pierric opened 5 years ago
Here is a bug. It happens when pretty print a promoted list or tuple of promoted type. For example:
Prelude Language.Haskell.Exts Language.Haskell.Exts.Syntax Language.Haskell.Exts.Pretty> a = TyPromoted () (PromotedList () True [TyPromoted () (PromotedTuple () [])]) Prelude Language.Haskell.Exts Language.Haskell.Exts.Syntax Language.Haskell.Exts.Pretty> prettyPrint a "'['()]"
However GHC (8.4.4) does not accept '['()]
'['()]
A.hs:4:10: error: parse error on input ‘'’ | 4 | type X = '['()] | ^
So I add one space after the bracket when pretty print. The above example will become "'[ '()]", which makes GHC very happy.
"'[ '()]"
any idea about this PR?
Here is a bug. It happens when pretty print a promoted list or tuple of promoted type. For example:
However GHC (8.4.4) does not accept
'['()]
So I add one space after the bracket when pretty print. The above example will become
"'[ '()]"
, which makes GHC very happy.