
#12378: Not enough inlining happens with single-method type classes -------------------------------------+------------------------------------- Reporter: akio | 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: -------------------------------------+------------------------------------- In the attached file, GHC produces code (with `-O2`) for `foo` that references a top-level definition of type `Small (Either () ())`, despite the fact that all bindings in the module are marked INLINE. If I use `-DOTHER_METHOD` to add another method to the class, this problem goes away. It looks like a ClassOp rule is helping here. I'm not sure if this is a bug, but it was a surprising behavior for me, so I'm reporting it. Please feel free to close this ticket if it's the correct behavior. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12378 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler