[GHC] #14320: Brackets change meaning of value-constructor type

GHC ghc-devs at haskell.org
Sat Oct 7 21:07:30 UTC 2017


#14320: Brackets change meaning of value-constructor type
-------------------------------------+-------------------------------------
        Reporter:  nr                |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.1
  checker)                           |             Keywords:  GADT,
      Resolution:                    |  existential type
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4072
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"f1d2db68d87f2c47a8dd4d86910e415599777f9f/ghc" f1d2db6/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="f1d2db68d87f2c47a8dd4d86910e415599777f9f"
 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
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14320#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list