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
- toJSString :: a -> JSString
- class FromJSVal a => FromJSString a where
- fromJSString :: JSString -> a
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 Text Source # | |
Defined in Language.Javascript.JSaddle.Value toJSString :: Text -> JSString Source # | |
ToJSString String Source # | |
Defined in Language.Javascript.JSaddle.Value toJSString :: String -> 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 Text Source # | |
Defined in Language.Javascript.JSaddle.Value fromJSString :: JSString -> Text Source # | |
FromJSString String Source # | |
Defined in Language.Javascript.JSaddle.Value fromJSString :: JSString -> String Source # | |
FromJSString JSString Source # | |
Defined in Language.Javascript.JSaddle.Value fromJSString :: JSString -> JSString Source # |