Safe Haskell | None |
---|
JavaScript string conversion functions
- type JSStringRef = Ptr OpaqueJSString
- class MakeStringRef a where
- makeStringRef :: a -> JSStringRef
- strToText :: MonadIO m => JSStringRef -> m Text
- textToStr :: Text -> JSStringRef
Documentation
type JSStringRef = Ptr OpaqueJSString
class MakeStringRef a where
Anything that can be used to make a JavaScript string reference
makeStringRef :: a -> JSStringRef
MakeStringRef String | |
MakeStringRef Text | |
MakeStringRef JSStringRef | If we already have a JSStringRef we are fine |
Data.Text helpers
strToText :: MonadIO m => JSStringRef -> m Text
Convert a JavaScript string to a Haskell Text
textToStr :: Text -> JSStringRef
Convert a Haskell Text
to a JavaScript string