haste-compiler-0.5.0: Haskell To ECMAScript compiler

Safe HaskellNone
LanguageHaskell98

Haste.Prim

Synopsis

Documentation

newtype JSString Source

JSStrings are represented as normal strings server-side; should probably be changed to ByteString or Text.

Constructors

JSString String 

catJSStr :: JSString -> [JSString] -> JSString Source

Concatenate a series of JSStrings using the specified separator.

newtype JSAny Source

Any JS value, with one layer of indirection.

Constructors

JSAny (Ptr Any) 

data Ptr a :: * -> *

A value of type Ptr a represents a pointer to an object, or an array of objects, which may be marshalled to or from Haskell values of type a.

The type a will often be an instance of class Storable which provides the marshalling operations. However this is not essential, and you can provide your own operations to access the pointer. For example you might write small foreign functions to get or set the fields of a C struct.

Instances

Eq (Ptr a) 
Ord (Ptr a) 
Show (Ptr a) 
FromAny (Ptr a) 
ToAny (Ptr a) 
Typeable (* -> *) Ptr 

toPtr :: a -> Ptr a Source

fromPtr :: Ptr a -> a Source

veryUnsafePerformIO :: IO a -> a Source

Strict, inlineable, dupable version of unsafePerformIO. Only use if you are extremely sure this is not a problem. So please don't.