
#10744: Allow oneShot to work with unboxed types -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by akio): Replying to [comment:4 nomeata]:
Hmm, I am not sure if this is a valid use of `oneShot` if you cannot guarantee that the Builder will be used only once, as GHC and the runtime (probably) relies on the annotation to be correct, and you might get crashes at runtime.
Oh, I didn't know this, thank you for pointing it out. I had hoped that it worked the same way as the state hack, which does not cause a crash even if the assumption is violated and the IO action is used multiple times. If this is not a valid use of `oneShot`, I don't have real uses that involve unlifted types. I'm happy to close this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10744#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler