Haskell ATerm Library (1.4)ContentsIndex
ATermConversion
Portability portable
Stability experimental
Maintainer joost.visser@di.uminho.pt
Contents
Conversion to and from ATerms
Conversion of ATerms to and from Strings
Instances for basic types
Description
This module is part of the ATerm library for Haskell. It provides the class ATermConvertible of types that are convertible to and from ATerms. Additionally, it provides default instances of this class for some predefined Prelude types.
Synopsis
class ATermConvertible t where
toATerm :: t -> ATerm
fromATerm :: ATerm -> t
fromATermError :: String -> ATerm -> a
toATermString :: ATermConvertible t => t -> String
toSharedATermString :: ATermConvertible t => t -> String
fromATermString :: ATermConvertible t => String -> t
Conversion to and from ATerms
class ATermConvertible t where
Methods
toATerm :: t -> ATerm
Convert to an ATerm.
fromATerm :: ATerm -> t
Convert from an ATerm.
Instances
ATermConvertible a => ATermConvertible [a]
ATermConvertible a => ATermConvertible (Maybe a)
(ATermConvertible a, ATermConvertible b) => ATermConvertible (a, b)
(ATermConvertible a, ATermConvertible b) => ATermConvertible (Either a b)
ATermConvertible String
Integral n => ATermConvertible n
ATermConvertible Bool
ATermConvertible ()
ATermConvertible Char
(Integral a, ATermConvertible a) => ATermConvertible (Ratio a)
fromATermError :: String -> ATerm -> a
Auxiliary function for reporting errors.
Conversion of ATerms to and from Strings
toATermString :: ATermConvertible t => t -> String
Convert to a textual ATerm representation without sharing (TXT format).
toSharedATermString :: ATermConvertible t => t -> String
Convert to a textual ATerm representation with full sharing (TAF format).
fromATermString :: ATermConvertible t => String -> t
Convert from a textual ATerm representation.
Instances for basic types
Produced by Haddock version 0.6