
#12640: Class member functions not substituted for MultiParamTypeClasses -------------------------------------+------------------------------------- Reporter: jeremy-list | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Runtime Unknown/Multiple | performance bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When the following code is compiled with "-O2 -ddump-rule-firings" the rule is not fired: presumably because the simplifier does not recognize that (+++) = ex_or. {{{#!hs {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} class Ex2 a b c | a b -> c where (+++) :: a -> b -> c instance Ex2 Bool Bool Bool where (+++) = ex_or {-# INLINE [2] ex_or #-} ex_or = (||) {-# RULES "force-inline" forall a b . ex_or a b = a || b #-} main = print (True +++ True) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12640 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler