to-string-class-0.1.2: Converting string-like types to Strings.

StabilityStable
Maintainerv.dijk.bas@gmail.com

Data.String.ToString

Description

 

Synopsis

Documentation

class ToString s whereSource

Class of string-like types that can be converted to Strings.

Ensure that types that have an instance for this class and also have an instance for IsString obey the prop_fromToString law.

Methods

toString :: s -> StringSource

Convert a string-like type to a String.

fromToString :: (IsString s2, ToString s1) => s1 -> s2Source

General coercion between string-like types.

Note that: fromToString = fromString . toString

prop_fromToString :: (IsString s, ToString s, Eq s) => s -> BoolSource

prop_fromToString x = fromToString x == x