[GHC] #9797: Investigate rewriting `>>=` to `*>` or `>>` for appropriate types

#9797: Investigate rewriting `>>=` to `*>` or `>>` for appropriate types -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dfeuer Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: 7.9 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Runtime Blocked By: | performance bug Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- When we see `m >>= (\_ -> n)` with a type that admits an optimized `>>` or `<$`, we should try to take advantage of that. I don't currently know if this applies to any types under "GHC HQ" control. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9797 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9797: Investigate rewriting `>>=` to `*>` or `>>` for appropriate types -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dfeuer Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Core | Version: 7.9 Libraries | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Runtime | Related Tickets: performance bug | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by ekmett): The danger with this proposal of course occurs when users have {{{ m >> n = m >>= \_ -> n }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9797#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9797: Investigate rewriting `>>=` to `*>` or `>>` for appropriate types -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dfeuer Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Core | Version: 7.9 Libraries | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Runtime | Related Tickets: performance bug | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:1 ekmett]:
The danger with this proposal of course occurs when users have
{{{ m >> n = m >>= \_ -> n }}}
There is no danger, because the rules would only apply to specified types. The main question is how likely it is that we'll be able to work around inlining in various situations. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9797#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9797: Investigate rewriting `>>=` to `*>` or `>>` for appropriate types -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dfeuer Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Core | Version: 7.9 Libraries | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Runtime | Related Tickets: performance bug | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by ekmett): Ah. I misread your proposal. Doing it 'pointwise' on a case by case basis like that is fine. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9797#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9797: Investigate rewriting `>>=` to `*>` or `>>` for appropriate types -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dfeuer Type: task | Status: closed Priority: normal | Milestone: Component: Core Libraries | Version: 7.9 Resolution: wontfix | 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: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => closed * resolution: => wontfix Comment: This seems likely to be much more trouble than it's worth, especially since the types in question seem likely to be internal compiler bits and trying to match on lambdas doesn't seem like the greatest way to make friends and influence people. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9797#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC