Popularity
2.8
Declining
Activity
0.0
Stable
1
4
0

Monthly Downloads: 8
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Development     Fay    

fay-ref alternatives and similar packages

Based on the "Fay" category.
Alternatively, view fay-ref alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of fay-ref or a related project?

Add another 'Fay' Package

README

Fay Ref

This package works like Data.IORef, but in the Fay monad. It allows you to create mutable variables and update them from within Fay.

main :: Fay ()
main = do
  fr <- newFayRef (10 :: Int)
  readFayRef fr -- Should give 10.
  writeFayRef fr 20
  readFayRef fr -- Should give 20.
  modifyFayRef fr (*2)
  readFayRef fr -- Should give 40.
  -- The above was non-strict; here is the strict variant.
  modifyFayRef' fr (*2)
  readFayRef fr -- Should give 80.
  return ()

Usage

To use this with fay, cabal install the package which will put the source files in fay ~/.cabal/share/fay-ref-0.1.0.0/src. You can then compile with fay using

fay --package fay-ref MyFile.hs