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 | Safe-Inferred |
Language | Haskell2010 |
Miso.String
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 = Text
- module Data.Monoid
- module Data.Text
- module Data.Text
- ms :: ToMisoString str => str -> MisoString
Documentation
class ToMisoString str where Source #
Convenience class for creating MisoString
from other string-like types
Methods
toMisoString :: str -> MisoString Source #
Instances
class FromMisoString t where Source #
Class from safely parsing MisoString
Methods
fromMisoStringEither :: MisoString -> Either String t Source #
Instances
fromMisoString :: FromMisoString a => MisoString -> a Source #
Parses a MisoString
, throws an error when decoding
fails. Use fromMisoStringEither
for as a safe alternative.
type MisoString = Text Source #
String type swappable based on compiler
module Data.Monoid
module Data.Text
module Data.Text
ms :: ToMisoString str => str -> MisoString Source #
Convenience function, shorthand for toMisoString