[GHC] #10451: Constraint tuple regression in HEAD

GHC ghc-devs at haskell.org
Wed May 27 14:00:25 UTC 2015


#10451: Constraint tuple regression in HEAD
-------------------------------------+-------------------------------------
              Reporter:  darchon     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.11
              Keywords:              |  Operating System:  Unknown/Multiple
  ConstraintKinds                    |   Type of failure:  GHC rejects
          Architecture:              |  valid program
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 The following file works in GHC 7.10.1, but fails in HEAD:

 {{{
 {-# LANGUAGE ConstraintKinds #-}
 module ConstraintKinds where

 type ManyEq a
   = (Eq a
     ,Eq a
     ,Eq a
     ,Eq a
     ,Eq a
     ,Eq a
     ,Eq a
     ,Eq a
     ,Eq a -- Comment this line to make compilation succeed in HEAD
     )
 }}}

 This is most likely due to ffc21506894c7887d3620423aaf86bc6113a1071, which
 has set a limit on constraint tuples to size `8`.

 I think we should either:
 - increase the size limit on constraint tuples to be the same as normal
 tuples (`62`), or,
 - automatically nest constraint kinds beyond 8-tuples, or,
 - carefully document this limitation for the next release.

 Note that I encountered this limitation in my own code that I and others
 actually use: http://hackage.haskell.org/package/clash-
 prelude-0.7.5/docs/src/CLaSH-Sized-Fixed.html#ENumSFixedC

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


More information about the ghc-tickets mailing list