| Copyright | (C) 2016-2025 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.String
Contents
Description
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.Monoid
- ms :: ToMisoString str => str -> MisoString
Documentation
class ToMisoString str where Source #
Convenience class for creating MisoString from other string-like types
Instances
class FromMisoString t where Source #
Class used to parse a MisoString. Like a safe Read for MisoString
Methods
fromMisoStringEither :: MisoString -> Either String t Source #
Instances
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.Monoid
ms :: ToMisoString str => str -> MisoString Source #
Convenience function, shorthand for toMisoString