[GHC] #15211: exprFreeVars does not include type variables

GHC ghc-devs at haskell.org
Mon Jun 4 09:14:17 UTC 2018


#15211: exprFreeVars does not include type variables
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
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 simonpj):

 > However, this function doesn't include the type variables free in the
 free term variables

 That would indeed seem wrong.  I think you are suggesting that a
 `closeOverKinds`-style thing is needed?

 If so, then in `CoreFVs.expr_fvs`
 {{{
 expr_fvs (Type ty) fv_cand in_scope acc =
   tyCoFVsOfType ty fv_cand in_scope acc
 }}}
 we would ''not'' want to use a version of `tyCoFVsOfType` that closed over
 the kinds.  (We'll do that at the end; and it's wrong to do so at the
 occurrences.

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


More information about the ghc-tickets mailing list