Safe Haskell | None |
---|---|
Language | Haskell2010 |
JSStrings
in JSaddle (when compiled with GHC) is not a JSVal
instead it
is implemented with a Text
.
Synopsis
- class ToJSVal a => ToJSString a where
- class FromJSVal a => FromJSString a where
Type class to convert Haskell to JavaScript string
class ToJSVal a => ToJSString a where Source #
Anything that can be used to make a JavaScript string
toJSString :: a -> JSString Source #
Instances
ToJSString String Source # | |
Defined in Language.Javascript.JSaddle.Value toJSString :: String -> JSString Source # | |
ToJSString Text Source # | |
Defined in Language.Javascript.JSaddle.Value toJSString :: Text -> JSString Source # | |
ToJSString JSString Source # | If we already have a JSString we are fine |
Defined in Language.Javascript.JSaddle.Value toJSString :: JSString -> JSString Source # |
class FromJSVal a => FromJSString a where Source #
Anything that can be constructed from a JavaScript string
fromJSString :: JSString -> a Source #
Instances
FromJSString String Source # | |
Defined in Language.Javascript.JSaddle.Value fromJSString :: JSString -> String Source # | |
FromJSString Text Source # | |
Defined in Language.Javascript.JSaddle.Value fromJSString :: JSString -> Text Source # | |
FromJSString JSString Source # | |
Defined in Language.Javascript.JSaddle.Value fromJSString :: JSString -> JSString Source # |