Data.String.Conversions.Monomorphic

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 #

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 #

# From a monomorphic input to a polymorphic output

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 #