RE: Behavior of touch#

2014-12-16 Thread Simon Peyton Jones
Would it make sense to elaborate the Haddock docs to explain stuff here? Simon From: Glasgow-haskell-users [mailto:glasgow-haskell-users-boun...@haskell.org] On Behalf Of Carter Schonwald Sent: 16 December 2014 06:45 To: Brandon Simmons Cc: glasgow-haskell-users Subject: Re: Behavior of touch

Behavior of touch#

2014-12-15 Thread Brandon Simmons
The `primitive` package exports a lifted version of the undocumented `touch#` http://hackage.haskell.org/package/ghc-prim-0.3.1.0/docs/GHC-Prim.html which has type: touch :: PrimMonad m = a - m () I'd like to know if this works correctly in general, or will it suffer from the same

Re: Behavior of touch#

2014-12-15 Thread Carter Schonwald
https://github.com/ghc/ghc/blob/8c10b67ba049477cc9ed23e61f5bd119e1cefc29/compiler/cmm/CmmMachOp.hs#L556 and https://github.com/ghc/ghc/blob/8c10b67ba049477cc9ed23e61f5bd119e1cefc29/compiler/nativeGen/X86/CodeGen.hs#L1731 spell it out a bit more so touch is preserved through the CMM level, and