#5001: makeCorePair: arity missing
------------------------------------------------+---------------------------
Reporter: maeder | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 7.2.1
Component: Compiler | Version: 7.0.2
Resolution: fixed | Keywords:
Testcase: | Blockedby:
Difficulty: | Os:
Unknown/Multiple
Blocking: | Architecture:
Unknown/Multiple
Failure: Incorrect warning at compile-time |
------------------------------------------------+---------------------------
Changes (by simonpj):
* status: infoneeded => closed
* resolution: => fixed
Comment:
I investigated michaelt's example. Your SPECIALISE pragmas for `myEnum`
in M2 is for the class method
{{{
myEnum :: MyEnum a => [a]
}}}
But the class method is just a record selector, so specialising it doesn't
make much sense. (The reason for the bleating message is related to it
being a class method too, but that's an implementation detail.) So I've
arranged to give a more helpful message if you try to specialise a class
method.
{{{
commit 777b8c4bd6f8a76f2fd365aa43451b7af098e9ef
Author: Simon Peyton Jones <[email protected]>
Date: Mon Jun 13 15:03:38 2011 +0100
Don't allow specialisation of class methods (fixes Trac #5001)
It doesn't make sense to specialise class methods -- their
code is simply a record selector. Moreover, such methods
don't (currently) have an inl_sat field in their InlinePragma
which made DsBinds.makeCoreArity bleat.
This patch just ignores such pragmas, with a warning.
>---------------------------------------------------------------
compiler/deSugar/DsBinds.lhs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
}}}
That done, I'm closing the ticket.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5001#comment:6>
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