Copyright | (C) 2016-2018 David M. Johnson |
---|---|
License | BSD3-style (see the file LICENSE) |
Maintainer | David M. Johnson <djohnson.m@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- class ToMisoString str where
- toMisoString :: str -> MisoString
- class FromMisoString t where
- fromMisoStringEither :: MisoString -> Either String t
- fromMisoString :: FromMisoString a => MisoString -> a
- type MisoString = JSString
- module Data.JSString
- module Data.JSString
- module Data.Monoid
- ms :: ToMisoString str => str -> MisoString
Documentation
class ToMisoString str where Source #
Convenience class for creating MisoString
from other string-like types
toMisoString :: str -> MisoString Source #
Instances
ToMisoString Double Source # | |
Defined in Miso.String toMisoString :: Double -> MisoString Source # | |
ToMisoString Float Source # | |
Defined in Miso.String toMisoString :: Float -> MisoString Source # | |
ToMisoString Int Source # | |
Defined in Miso.String toMisoString :: Int -> MisoString Source # | |
ToMisoString Word Source # | |
Defined in Miso.String toMisoString :: Word -> MisoString Source # | |
ToMisoString String Source # | |
Defined in Miso.String toMisoString :: String -> MisoString Source # | |
ToMisoString ByteString Source # | |
Defined in Miso.String toMisoString :: ByteString -> MisoString Source # | |
ToMisoString ByteString Source # | |
Defined in Miso.String toMisoString :: ByteString -> MisoString Source # | |
ToMisoString Text Source # | |
Defined in Miso.String toMisoString :: Text -> MisoString Source # | |
ToMisoString Text Source # | |
Defined in Miso.String toMisoString :: Text -> MisoString Source # | |
ToMisoString MisoString Source # | |
Defined in Miso.String toMisoString :: MisoString -> MisoString Source # |
class FromMisoString t where Source #
Class used to parse a MisoString
. Like a safe Read
for MisoString
fromMisoStringEither :: MisoString -> Either String t Source #
Instances
FromMisoString Double Source # | |
Defined in Miso.String | |
FromMisoString Float Source # | |
Defined in Miso.String | |
FromMisoString Int Source # | |
Defined in Miso.String | |
FromMisoString Word Source # | |
Defined in Miso.String | |
FromMisoString String Source # | |
Defined in Miso.String | |
FromMisoString ByteString Source # | |
Defined in Miso.String | |
FromMisoString ByteString Source # | |
Defined in Miso.String | |
FromMisoString Text Source # | |
Defined in Miso.String | |
FromMisoString Text Source # | |
Defined in Miso.String | |
FromMisoString MisoString Source # | |
Defined in Miso.String |
fromMisoString :: FromMisoString a => MisoString -> a Source #
Reads a MisoString
, throws an error when decoding
fails. Use fromMisoStringEither
for as a safe alternative.
type MisoString = JSString Source #
String type swappable based on compiler
module Data.JSString
module Data.JSString
module Data.Monoid
ms :: ToMisoString str => str -> MisoString Source #
Convenience function, shorthand for toMisoString
Orphan instances
ToJSON MisoString Source # |
|
toJSON :: MisoString -> Value Source # toEncoding :: MisoString -> Encoding Source # toJSONList :: [MisoString] -> Value Source # toEncodingList :: [MisoString] -> Encoding Source # | |
FromJSON MisoString Source # |
|
parseJSON :: Value -> Parser MisoString Source # parseJSONList :: Value -> Parser [MisoString] Source # | |
StringLike MisoString Source # | |
empty :: MisoString Source # cons :: Char -> MisoString -> MisoString Source # uncons :: MisoString -> Maybe (Char, MisoString) Source # toString :: MisoString -> String Source # fromChar :: Char -> MisoString Source # strConcat :: [MisoString] -> MisoString Source # strNull :: MisoString -> Bool Source # append :: MisoString -> MisoString -> MisoString Source # strMap :: (Char -> Char) -> MisoString -> MisoString Source # |