[GHC] #14939: Lint error in forall type

GHC ghc-devs at haskell.org
Mon Jun 4 15:54:15 UTC 2018


#14939: Lint error in forall type
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
                                     |  StaticPointers
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"9d600ea68c283b0d38ac663c3cc48baba6b94f57/ghc"
 9d600ea6/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="9d600ea68c283b0d38ac663c3cc48baba6b94f57"
 Expand type synonyms when Linting a forall

 Trac #14939 showed a type like
    type Alg cls ob = ob
    f :: forall (cls :: * -> Constraint) (b :: Alg cls *). b

 where the kind of the forall looks like (Alg cls *), with a
 free cls. This tripped up Core Lint.

 I fixed this by making Core Lint a bit more forgiving, expanding
 type synonyms if necessary.

 I'm worried that this might not be the whole story; notably
 typeKind looks suspect.  But it certainly fixes this problem.
 }}}

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


More information about the ghc-tickets mailing list