[GHC] #15954: LiberalTypeSynonyms unsaturation check doesn't kick in

GHC ghc-devs at haskell.org
Fri Nov 30 23:34:23 UTC 2018


#15954: LiberalTypeSynonyms unsaturation check doesn't kick in
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.3
       Component:  Compiler (Type    |              Version:  8.6.2
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Sorry to be slow.

 1.  Yes, this is a good message

 2.  I'm not so bothered here.  Is it really better to say `Illegal
 polymorphic type: PolyId`?  It doesn't look polymorphic.  (In (1) would
 you have preferred  `Illegal polymorphic type A`?   That doesn't look
 polymorphic either.

   Also if we had
 {{{
 type A = (forall a. a->a) -> Int
 foo :: F A
 foo = ...
 }}}
   we couldn't possibly report in terms of `A`.

   It's easy to see why it happens: we've moved synonym expansion first!

 3. `tc149`.  Yes I agree, it should have `Language LiberalTypeSynonyms` at
 the top.  I think the test predates the flag.

 This change fixes an outright bug; and I think the regression is arguably
 and improvement.  So let's do it!

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


More information about the ghc-tickets mailing list