[GHC] #12087: Inconsistency in GADTs?

GHC ghc-devs at haskell.org
Tue Aug 15 02:10:30 UTC 2017


#12087: Inconsistency in GADTs?
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  GADTs
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11540            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  patch => new
 * owner:  RyanGlScott => (none)
 * differential:  Phab:D3831 =>


Comment:

 Richard and I decided that the approach taken in Phab:D3831 wasn't the
 best course of action. Although it would allow exotic GADT constructor
 type signatures like `Ord a => Eq a => a -> F a`, it would come at a steep
 price: GHC would normalize the type signature to `(Ord a, Eq a) => a -> F
 a` behind the scenes, so you'd no longer see the type you originally wrote
 when you queried it with `:type +v`.

 For this reason, I've decided to try to improve the current error message
 instead, which doesn't make it very clear what the underlying problem is
 (nor how to fix it). Patch coming soon.

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


More information about the ghc-tickets mailing list