I want to write something like
type State a = IORef a
newState :: a -> State a
newState v = unsafePerformIO (newIORef v)
But I don't want the compileer to inline this nor to inline any
application of this.
{#NOINLINE newState#}
But how can I stop this function to be inlined when applied for example :
....
let x = newState 0 in
{... code where x is used twice ...}
How to be sure that x isn't inlined and that all occurences of x are
pointing to the same memory place ?
Best regards,
Nicolas Oury
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
- Re: unsafePerformIO and IORefs Nicolas Oury
- Re: unsafePerformIO and IORefs Hal Daume III
- Re: unsafePerformIO and IORefs Sven Panne
- Re: unsafePerformIO and IORefs Michael Weber
- Re: unsafePerformIO and IORefs Ashley Yakeley
- Re: unsafePerformIO and IORefs Lennart Augustsson
- RE: unsafePerformIO and IORefs Simon Marlow
- RE: unsafePerformIO and IORefs Simon Marlow