• Ryan Scott's avatar
    Fix #15738 by defining (and using) parenthesizeHsContext · 02b2116e
    Ryan Scott authored
    With `QuantifiedConstraints`, `forall`s can appear in more
    nested positions than they could before, but `Convert` and the TH
    pretty-printer were failing to take this into account. On the
    `Convert` side, this is fixed by using a `parenthesizeHsContext`
    to parenthesize singleton quantified constraints that appear to the
    left of a `=>`. (A similar fix is applied to the TH pretty-printer.)
    Test Plan: make test TEST=T15738
    Reviewers: goldfire, bgamari
    Reviewed By: bgamari
    Subscribers: rwbarton, carter
    GHC Trac Issues: #15738
    Differential Revision: https://phabricator.haskell.org/D5222
all.T 19.9 KB