
#12620: Allow the user to prevent floating and CSE -------------------------------------+------------------------------------- Reporter: nomeata | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by duncan): Can I suggest a closely related idea, and also related to #9520 {{{ data Pipe i o r = Yield o {-# NOUPDATE #-} (Pipe i o r) }}} This says we'll never do thunk updates on that field in that constructor. So similar idea (I believe) to `oneShot` lambdas. Indeed we might need both no update on fields and oneShot, I'm not sure, e.g.: {{{ data Pipe i o r = Yield o {-# NOUPDATE #-} (Pipe i o r) | Await {-# NOUPDATE #-} (Either r i -> Pipe i o r) -- smart constructor: await f = Await (GHC.Magic.oneShot f) }}} What's all this for? For avoiding treating these control structures as data structures (which is what #9520 is all about). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12620#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler