[GHC] #13151: Make all never-exported IfaceDecls implicit

GHC ghc-devs at haskell.org
Thu Jan 19 22:46:46 UTC 2017


#13151: Make all never-exported IfaceDecls implicit
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:  ezyang
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:                    |             Keywords:  backpack
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):

 I like it the way it is.  Here's why.

 Unfoldings for any old function might mention `$fEqList` the `DFun` for
 equality on lists.  So there must be a top-level declaration for
 `$fEqList` in the interface file
 {{{
 $fEqList :: forall a. Eq a -> Eq [a]
 -- ...together with arity, unfolding, strictness, whatever, just
 -- like any other Id...
 }}}
 or at least it is simple and convenient for that to be the case.  It's
 particularly important that it has an unfolding;l this unfolding is always
 a `DFunUnfolding`.

 And once we have that, it seems simpler to refer to it from the instance
 decl rather than to duplicate it.

 I suppose you could put all this in the instance decl.  But would need to
 define the top-level Id `$fEqList`.

 I have not yet grokked what's hard about the sataus quo.  I'm not
 fundamentally against refactoring it though.

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


More information about the ghc-tickets mailing list