[GHC] #8714: ExistentialQuantification plus DeriveDataTypeable leads to core lint error

GHC ghc-devs at haskell.org
Thu Feb 27 13:59:39 UTC 2014


#8714: ExistentialQuantification plus DeriveDataTypeable leads to core lint error
-------------------------------------+----------------------------------
        Reporter:  CoreyOConnor      |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+----------------------------------

Comment (by simonpj):

 Well nailed!

 We need the cloning because when we float bindings out we might widen the
 scope of its binders, and we don't want to accidentally capture an un-
 related occurrence.

 Originally we only floated let-bindings, which bind only Ids, and so the
 substitution substituted only for Ids.

 But now we flaot case-expressions too, and they can bind type variables.
 Once the substitution binds type variables it must be applied to many more
 things (e.g. the types of other binders) which is not done at all at the
 moment.

 So your diagnosis is right but the fix isn't a one-liner.  I'll work on
 it.

 Simon

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


More information about the ghc-tickets mailing list