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

GHC ghc-devs at haskell.org
Wed Jan 11 10:38:24 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 rwbarton):

 Unfortunately my claim

 > Anyone who does use the `GHC.LargeTuple` type family instances (even
 indirectly through another module) will have `GHC.LargeTuple` as a "family
 instances" import of their module

 turns out not to be true. The family instances imports of a module are
 calculated from its imports, and at that point we don't know whether the
 module will mention any large tuples.

 For the same reason putting type family instances in a module where a
 wired-in thing lives is a dangerous thing to do in general, since we might
 read the wired-in module and learn about its instances and then use them
 without tracking their origin. (I found #13102 while writing the previous
 sentence.) I don't know whether there are existing occurrences of this in
 base, but it's exactly what I wanted to add.

 Note that adding an `import GHC.LargeTuple ()` to Prelude is not a
 complete solution either, since a module using large tuples and their
 Generic instance could have `-XNoImplicitPrelude`. So I don't have a
 solution that I'm really happy with here.

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


More information about the ghc-tickets mailing list