Ticket #2364 (closed feature request: fixed)

Opened 5 years ago

Last modified 5 years ago

Make the maximum tuple size accesible

Reported by: fons Owned by:
Priority: normal Milestone: 6.10.1
Component: Compiler Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

In relation with the implementation of a Haskell-embedded DSL, I'm using Template Haskell to automatically generate instances for tuples.

I'd like to use tuples as big as GHC allows me to. However, the upper size limit (62 as of GHC 6.8.2) is not accessible by the end user. That forces me to hardcode the size, which, as you can imagine, is not a good practice since the value can change in future versions of the compiler.

Thus, I propose to include a constant (e.g. maxTupleSize) somewhere under GHC.* (maybe GHC.Exts) for that purpose.

Change History

Changed 5 years ago by igloo

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed
  • milestone set to 6.10.1

I've made it available in the HEAD:

Prelude> GHC.Exts.maxTupleSize
62

We should probably put it somewhere more sensible, e.g. Data.Tuple, at some point.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.