string-conversions-0.4.0.1: Simplifies dealing with different types for strings

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.String.Conversions.Monomorphic

Contents

- From a polymorphic input to a monomorphic output
- From a monomorphic input to a polymorphic output

Description

Monomorphic conversion functions that are useful when you wish to be explicit about the conversion without writing a type signature or when `cs` is ambiguous due to polymorphic inputs or outputs.

All functions in this module have `cs` as their implementation.

Synopsis

- toString :: ConvertibleStrings a String => a -> String
- toStrictByteString :: ConvertibleStrings a StrictByteString => a -> StrictByteString
- toSBS :: ConvertibleStrings a SBS => a -> SBS
- toLazyByteString :: ConvertibleStrings a LazyByteString => a -> LazyByteString
- toLBS :: ConvertibleStrings a LBS => a -> LBS
- toStrictText :: ConvertibleStrings a StrictText => a -> StrictText
- toST :: ConvertibleStrings a ST => a -> ST
- toLazyText :: ConvertibleStrings a LazyText => a -> LazyText
- toLT :: ConvertibleStrings a LT => a -> LT
- fromString :: ConvertibleStrings String a => String -> a
- fromStrictByteString :: ConvertibleStrings StrictByteString a => StrictByteString -> a
- fromSBS :: ConvertibleStrings SBS a => SBS -> a
- fromLazyByteString :: ConvertibleStrings LazyByteString a => LazyByteString -> a
- fromLBS :: ConvertibleStrings LBS a => LBS -> a
- fromStrictText :: ConvertibleStrings StrictText a => StrictText -> a
- fromST :: ConvertibleStrings ST a => ST -> a
- fromLazyText :: ConvertibleStrings LazyText a => LazyText -> a
- fromLT :: ConvertibleStrings LT a => LT -> a

# From a polymorphic input to a monomorphic output

toString :: ConvertibleStrings a String => a -> String Source #

toStrictByteString :: ConvertibleStrings a StrictByteString => a -> StrictByteString Source #

toSBS :: ConvertibleStrings a SBS => a -> SBS Source #

toLazyByteString :: ConvertibleStrings a LazyByteString => a -> LazyByteString Source #

toLBS :: ConvertibleStrings a LBS => a -> LBS Source #

toStrictText :: ConvertibleStrings a StrictText => a -> StrictText Source #

toST :: ConvertibleStrings a ST => a -> ST Source #

toLazyText :: ConvertibleStrings a LazyText => a -> LazyText Source #

toLT :: ConvertibleStrings a LT => a -> LT Source #

# From a monomorphic input to a polymorphic output

fromString :: ConvertibleStrings String a => String -> a Source #

fromStrictByteString :: ConvertibleStrings StrictByteString a => StrictByteString -> a Source #

fromSBS :: ConvertibleStrings SBS a => SBS -> a Source #

fromLazyByteString :: ConvertibleStrings LazyByteString a => LazyByteString -> a Source #

fromLBS :: ConvertibleStrings LBS a => LBS -> a Source #

fromStrictText :: ConvertibleStrings StrictText a => StrictText -> a Source #

fromST :: ConvertibleStrings ST a => ST -> a Source #

fromLazyText :: ConvertibleStrings LazyText a => LazyText -> a Source #

fromLT :: ConvertibleStrings LT a => LT -> a Source #