#4227: Allow SPECIALISE pragmas for functions defined in another module
---------------------------+------------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler | Version: 6.12.3
Resolution: | Keywords:
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
---------------------------+------------------------------------------------
Changes (by Blaisorblade):
* status: closed => new
* resolution: fixed =>
Comment:
@dreixel: in the example, myEnum specialized to type [()] would coincide
with myEnum as defined in the instance. That is general for all non-
polymorphic instances: given an instance MyEnum [a], it would make sense
to specialized myEnum :: [Int] (I don't have GHC 7 to test this), assuming
that the instance definition myEnum :: [a] is marked as INLINABLE.
OTOH, if the original INLINABLE myEnum annotation is ignored, it should
not be ignored silently: an error or warning should be given, and _that is
a bug_.
Viceversa, INLINABLE on a class method _with_ a definition should be
respected. Is it not?
The only reasonable meaning of INLINABLE on an abstract class method could
be "make all instance definition inlinable", but in many cases you want to
allow specializing only specific instances which have a small size: this
might be a good reason against implementing it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4227#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