| Safe Haskell | None |
|---|
FayRef
- data FayRef a
- newFayRef :: a -> Fay (FayRef a)
- readFayRef :: FayRef a -> Fay a
- writeFayRef :: FayRef a -> a -> Fay ()
- modifyFayRef :: FayRef a -> (a -> a) -> Fay ()
- modifyFayRef' :: FayRef a -> (a -> a) -> Fay ()
Documentation
readFayRef :: FayRef a -> Fay aSource
Write a new value into a FayRef.
writeFayRef :: FayRef a -> a -> Fay ()Source
Write a new value into a FayRef.
modifyFayRef :: FayRef a -> (a -> a) -> Fay ()Source
Mutate the contents of a FayRef.
Be warned that modifyFayRef does not apply the function strictly. This
means if the program calls modifyFayRef many times, but seldomly uses the
value, thunks will pile up in memory resulting in a space leak.
modifyFayRef' :: FayRef a -> (a -> a) -> Fay ()Source
Strict version of modifyFayRef