pandoc-utils-0.4.0: Utility functions to work with Pandoc in Haskell applications.
Safe HaskellSafe
LanguageHaskell2010

Text.Pandoc.Utils

Description

Due to the switch from String to Text in pandoc-types 1.20, some legacy filters might not work in newer versions. This module contains some string conversion utility functions to make filters work in across different versions.

Synopsis

Conversions

class IsString s => ToString s where Source #

A helper typeclass for converting String and Text to String.

Methods

toString :: s -> String Source #

Convert strings to String.

Instances

Instances details
ToString Text Source # 
Instance details

Defined in Text.Pandoc.Utils

Methods

toString :: Text -> String Source #

Char ~ c => ToString [c] Source # 
Instance details

Defined in Text.Pandoc.Utils

Methods

toString :: [c] -> String Source #

class IsString s => ToText s where Source #

A helper typeclass for converting String and Text to Text.

Methods

toText :: s -> Text Source #

Convert strings to Text.

Instances

Instances details
ToText Text Source # 
Instance details

Defined in Text.Pandoc.Utils

Methods

toText :: Text -> Text Source #

Char ~ c => ToText [c] Source # 
Instance details

Defined in Text.Pandoc.Utils

Methods

toText :: [c] -> Text Source #

class IsText a where Source #

A helper typeclass for converting Text to either String or Text.

Methods

fromText :: Text -> a Source #

Convert from Text to strings

Instances

Instances details
IsText Text Source # 
Instance details

Defined in Text.Pandoc.Utils

Methods

fromText :: Text -> Text Source #

Char ~ c => IsText [c] Source # 
Instance details

Defined in Text.Pandoc.Utils

Methods

fromText :: Text -> [c] Source #

Reexport from Data.String

class IsString a where #

Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).

Methods

fromString :: String -> a #

Instances

Instances details
IsString Format 
Instance details

Defined in Text.Pandoc.Definition

Methods

fromString :: String -> Format #

a ~ Char => IsString [a]

(a ~ Char) context was introduced in 4.9.0.0

Since: base-2.1

Instance details

Defined in Data.String

Methods

fromString :: String -> [a] #

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b #