sunroof-compiler-0.2: Monadic Javascript Compiler

Safe HaskellNone



This module provides the equivalent of a IORef in the Sunroof world.



data JSRef a Source

This is the IORef of Sunroof.


Sunroof a => Show (JSRef a) 
Sunroof a => IfB (JSRef a) 
Sunroof a => EqB (JSRef a)

Reference equality, not value equality.

Sunroof a => Sunroof (JSRef a) 

newJSRef :: Sunroof a => a -> JS t (JSRef a)Source

Create a new JSRef with the given intial value.

readJSRef :: Sunroof a => JSRef a -> JS t aSource

Non-blocking read of a JSRef.

writeJSRef :: Sunroof a => a -> JSRef a -> JS t ()Source

Non-blocking write of a JSRef.

modifyJSRef :: Sunroof a => (a -> JS A a) -> JSRef a -> JS t ()Source

Non-blocking modification of a JSRef.