Fix #14320 by looking through HsParTy in more places
authorRyan Scott <ryan.gl.scott@gmail.com>
Sat, 7 Oct 2017 20:59:03 +0000 (16:59 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sat, 7 Oct 2017 20:59:03 +0000 (16:59 -0400)
commitf1d2db68d87f2c47a8dd4d86910e415599777f9f
treed54899b4141566fe0251eb6c685cf70e5a3fadfe
parent341d3a7896385f14580d048ea7681232e5b242ce
Fix #14320 by looking through HsParTy in more places

Summary:
GHC was needlessly rejecting GADT constructors' type
signatures that were surrounded in parentheses due to the fact that
`splitLHsForAllTy` and `splitLHsQualTy` (which are used to check as
part of checking if GADT constructor return types are correct)
weren't looking through parentheses (i.e., `HsParTy`). This is
easily fixed, though.

Test Plan: make test TEST=T14320

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14320

Differential Revision: https://phabricator.haskell.org/D4072
compiler/hsSyn/HsTypes.hs
testsuite/tests/gadt/T14320.hs [new file with mode: 0644]
testsuite/tests/gadt/all.T