
#14375: Implement with# primop -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: JoinPoints Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14346 | Differential Rev(s): ​Phab:D4110 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonmar): But if we had {{{ join j s = e in maskAsyncExceptions# j s }}} How can we compile this? `maskAsyncExceptions#` entails pushing a stack frame, but jumping to the join point entails truncating the stack back to the `join`. We can't do both! Am I missing something? I suggest that we treat `with#` in the same way as `runST` for the purposes of fixing the current bug. I think it'll be simpler to do it this way than what we have in Phab:D4110, because we don't need any support in the RTS at all. I agree it would be nicer to find a unified way of handing all these primops that take IO continuations, and especially it'd be great to avoid the allocation for `catch#`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14375#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler