Skip to content

Fix #16666 by parenthesizing contexts in Convert

Ryan Scott requested to merge RyanGlScott/ghc:wip/T16666 into master

Most places where we convert contexts in Convert are actually in positions that are to the left of some =>, such as in superclasses and instance contexts. Accordingly, these contexts need to be parenthesized at funPrec. To accomplish this, this patch changes cvtContext to require a precedence argument for the purposes of calling parenthesizeHsContext and adjusts all cvtContext call sites accordingly.

Merge request reports