#5237: Inefficient code generated for x^2 --------------------------------------+------------------------------------- Reporter: scpmw | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.4.1 Component: libraries/base | Version: 7.0.3 Resolution: | Keywords: Testcase: | Blockedby: Difficulty: | Os: Linux Blocking: | Architecture: x86_64 (amd64) Failure: Runtime performance bug | --------------------------------------+-------------------------------------
Comment(by simonpj@…): commit 814d864125bdd03d8bc6c3fc551f393b21942c6c {{{ Author: Simon Peyton Jones <simo...@microsoft.com> Date: Thu Nov 24 12:35:33 2011 +0000 Support "phase control" for SPECIALISE pragmas This featurelet allows Trac #5237 to be fixed. The idea is to allow SPECIALISE pragmas to specify the phases in which the RULE is active, just as you can do with RULES themselves. {-# SPECIALISE [1] foo :: Int -> Int #-} This feature is so obvious that not having it is really a bug. There are, needless to say, a few wrinkles. See Note [Activation pragmas for SPECIALISE] in DsBinds compiler/deSugar/DsBinds.lhs | 60 +++++++++++++++++++++++++++++++++++- compiler/parser/Parser.y.pp | 11 ++++--- compiler/parser/RdrHsSyn.lhs | 3 +- docs/users_guide/glasgow_exts.xml | 40 ++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 8 deletions(-) }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5237#comment:19> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs