javascript-bridge-0.2.0: Remote Monad for JavaScript on the browser

Safe HaskellNone
LanguageHaskell2010

Network.JavaScript.Internal

Contents

Synopsis

JavaScript

Commands

Procedures

class Procedure f Source #

Minimal complete definition

internalProcedure

Primitives and (Remote) Values

data Primitive :: * -> * where Source #

var :: RemoteValue a -> JavaScript Source #

generate the text for a RemoteValue. They can be used as assignment targets as well, but exposes the JavaScript scoping semantics.

(Applicative) Packets

newtype Packet a Source #

The Remote Applicative Packet

Constructors

Packet (AF Primitive a) 
Instances
Functor Packet Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

fmap :: (a -> b) -> Packet a -> Packet b #

(<$) :: a -> Packet b -> Packet a #

Applicative Packet Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

pure :: a -> Packet a #

(<*>) :: Packet (a -> b) -> Packet a -> Packet b #

liftA2 :: (a -> b -> c) -> Packet a -> Packet b -> Packet c #

(*>) :: Packet a -> Packet b -> Packet b #

(<*) :: Packet a -> Packet b -> Packet a #

Procedure Packet Source # 
Instance details

Defined in Network.JavaScript.Internal

Command Packet Source # 
Instance details

Defined in Network.JavaScript.Internal

data AF :: (* -> *) -> * -> * where Source #

Constructors

PureAF :: a -> AF m a 
PrimAF :: m a -> AF m a 
ApAF :: AF m (a -> b) -> AF m a -> AF m b 
Instances
Functor (AF m) Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

fmap :: (a -> b) -> AF m a -> AF m b #

(<$) :: a -> AF m b -> AF m a #

Applicative (AF m) Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

pure :: a -> AF m a #

(<*>) :: AF m (a -> b) -> AF m a -> AF m b #

liftA2 :: (a -> b -> c) -> AF m a -> AF m b -> AF m c #

(*>) :: AF m a -> AF m b -> AF m b #

(<*) :: AF m a -> AF m b -> AF m a #

evalAF :: Applicative f => (forall x. m x -> f x) -> AF m a -> f a Source #

concatAF :: (forall x. m x -> Maybe b) -> AF m a -> [b] Source #

Monads

data M :: (* -> *) -> * -> * where Source #

Constructors

PureM :: a -> M m a 
PrimM :: m a -> M m a 
ApM :: M m (a -> b) -> M m a -> M m b 
BindM :: M m a -> (a -> M m b) -> M m b 
Instances
Monad (M m) Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

(>>=) :: M m a -> (a -> M m b) -> M m b #

(>>) :: M m a -> M m b -> M m b #

return :: a -> M m a #

fail :: String -> M m a #

Functor (M m) Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

fmap :: (a -> b) -> M m a -> M m b #

(<$) :: a -> M m b -> M m a #

Applicative (M m) Source # 
Instance details

Defined in Network.JavaScript.Internal

Methods

pure :: a -> M m a #

(<*>) :: M m (a -> b) -> M m a -> M m b #

liftA2 :: (a -> b -> c) -> M m a -> M m b -> M m c #

(*>) :: M m a -> M m b -> M m b #

(<*) :: M m a -> M m b -> M m a #

evalM :: Monad f => (forall x. m x -> f x) -> M m a -> f a Source #