Skip to content

Adjust AST to capture additional parens around a context

At the moment the parser strips redundant parens around a context when constructing the AST. So the following two definitions would end up with the same AST.

foo  :: (Show a) => a -> String
foo' :: ((Show a)) => a -> String

This causes roundtripping of an AST via ppr to fail, and adds complexity to the API Annotations.

Trac metadata
Trac field Value
Version 8.0.1
Type Task
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information