[GHC] #10451: Constraint tuple regression in HEAD
GHC
ghc-devs at haskell.org
Wed May 27 14:06:57 UTC 2015
#10451: Constraint tuple regression in HEAD
-------------------------------------+-------------------------------------
Reporter: darchon | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: | 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:
-------------------------------------+-------------------------------------
Description changed by darchon:
Old description:
> 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
New description:
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
)
}}}
The error that I get on HEAD is:
{{{
[1 of 1] Compiling ConstraintKinds ( ConstraintKinds.hs, interpreted )
ConstraintKinds.hs:5:5: error:
Can't find interface-file declaration for type constructor or class
(%,,,,,,,,%)
Probable cause: bug in .hi-boot file, or inconsistent .hi file
Use -ddump-if-trace to get an idea of which file caused the error
In the type ‘(Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a)’
In the type declaration for ‘ManyEq’
Failed, modules loaded: none.
}}}
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#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list