[GHC] #13072: Move large tuples to a separate module in base

GHC ghc-devs at haskell.org
Mon Jan 9 15:29:28 UTC 2017


#13072: Move large tuples to a separate module in base
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                Owner:  rwbarton
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  libraries/base    |              Version:  8.1
      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):

 >  any time the user loaded an interface file with their own type family
 instances, GHC would read the interface file for GHC.LargeTuple too to
 make sure there were no conflicts

 I don't think so. If M contains a type family instance, that instance
 should have been checked for consistency with `LargeTuple`.   See
 `FamInst`:
 {{{
 Note [Checking family instance consistency]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 For any two family instance modules that we import directly or indirectly,
 we
 check whether the instances in the two modules are consistent, *unless* we
 can
 be certain that the instances of the two modules have already been checked
 for
 consistency during the compilation of modules that we import.
 }}}
 So `M` and `LargeTuple` have already been checked; so importers of `M`
 won't need to check.  Right?

 To be sure it's a bit of a pain having to load `LargeTuple` for `M`.  But
 you suggested solution sounds ad-hoc and fragile to me.

 One possibility might be this: rather than a "family instance module"
 being a boolean flag, keep a list of the type functions it has instances
 of.  Now if A defines instances of FA and B defines instances of FB we
 don't need to check them against each other.

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


More information about the ghc-tickets mailing list