| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
GHCJS.Prim
Synopsis
- newtype JSVal = JSVal ()
 - data WouldBlockException = WouldBlockException
 - data JSException = JSException JSVal String
 - mkJSException :: JSVal -> IO JSException
 - fromJSString :: JSVal -> String
 - toJSString :: String -> JSVal
 - toJSArray :: [JSVal] -> IO JSVal
 - fromJSArray :: JSVal -> IO [JSVal]
 - fromJSInt :: JSVal -> Int
 - toJSInt :: Int -> JSVal
 - isNull :: JSVal -> Bool
 - isUndefined :: JSVal -> Bool
 - jsNull :: JSVal
 - getProp :: JSVal -> String -> IO JSVal
 - getProp' :: JSVal -> JSVal -> IO JSVal
 
Documentation
Constructors
| JSVal () | 
data WouldBlockException Source #
If a synchronous thread tries to do something that can only be done asynchronously, and the thread is set up to not continue asynchronously, it receives this exception.
Constructors
| WouldBlockException | 
Instances
| Show WouldBlockException Source # | |
Defined in GHCJS.Prim Methods showsPrec :: Int -> WouldBlockException -> ShowS # show :: WouldBlockException -> String # showList :: [WouldBlockException] -> ShowS #  | |
| Exception WouldBlockException Source # | |
Defined in GHCJS.Prim Methods toException :: WouldBlockException -> SomeException # fromException :: SomeException -> Maybe WouldBlockException #  | |
data JSException Source #
Constructors
| JSException JSVal String | 
Instances
| Show JSException Source # | |
Defined in GHCJS.Prim Methods showsPrec :: Int -> JSException -> ShowS # show :: JSException -> String # showList :: [JSException] -> ShowS #  | |
| Exception JSException Source # | |
Defined in GHCJS.Prim Methods toException :: JSException -> SomeException # fromException :: SomeException -> Maybe JSException # displayException :: JSException -> String #  | |
mkJSException :: JSVal -> IO JSException Source #
fromJSString :: JSVal -> String Source #
Low-level conversion utilities for packages that cannot depend on ghcjs-base
returns an empty string if the JSVal does not contain a string
toJSString :: String -> JSVal Source #
isUndefined :: JSVal -> Bool Source #