#2748: Fundep-laden code compiled and ran fine in 6.8, fails in 6.10
---------------------------------+------------------------------------------
Reporter: sedillard | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution: invalid
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by sedillard):
Thank you!
You're right, this particular function is pretty horrendous, but only
because I couldn't figure out how to write it so that the base case is a
1x1 matrix, instead of a 2x2. So to avoid overlap, the inductive case then
has to be at least 3x3, which gets to be fairly verbose. The overlapping
instance doesn't look too scary, does it?
Part of my problem here is that (continuing your example {{{class C}}}) I
_want_ to be able to declare something as {{{f :: C Int x => ... }}}. It's
not that I don't know what {{{x}}} is, (well, in this case I needed your
help to figure it out) but it's just that {{{x}}} might be of some really
verbose form. Its not even an issue of overlap, because {{{x}}} doesn't
necessarily appear in the instance type (or whatever that thing to the
right of {{{=>}}} is called.) It could be
{{{
instance (Class C Int x, Class Q x (Bool,Char)) => Class W (Bool,Char)
}}}
In that instance, {{{x}}} could be some hideously verbose type. It would
be nice if I could declare a synonym somewhere in the declaration, just a
plain substitution, saying that one is the same as the other. "Hey
listen, GHC, I'm going to type "x" here but I really mean
"(a,(b,(c,())))."
Would this situation be any different using type functions?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2748#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs