Portability | portable |
---|---|
Stability | experimental |
Maintainer | joost.visser@di.uminho.pt |
Safe Haskell | None |
Data.ATerm.Conversion
Contents
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.
- class ATermConvertible t where
- 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 whereSource
Methods
Convert to an ATerm.
Convert from an ATerm.
Instances
ATermConvertible Bool | |
ATermConvertible Char | |
ATermConvertible String | |
ATermConvertible () | |
Integral n => ATermConvertible n | |
ATermConvertible a => ATermConvertible [a] | |
(Integral a, ATermConvertible a) => ATermConvertible (Ratio a) | |
ATermConvertible a => ATermConvertible (Maybe a) | |
(ATermConvertible a, ATermConvertible b) => ATermConvertible (Either a b) | |
(ATermConvertible a, ATermConvertible b) => ATermConvertible (a, b) |
fromATermError :: String -> ATerm -> aSource
Auxiliary function for reporting errors.
Conversion of ATerms to and from Strings
toATermString :: ATermConvertible t => t -> StringSource
Convert to a textual ATerm representation without sharing (TXT format).
toSharedATermString :: ATermConvertible t => t -> StringSource
Convert to a textual ATerm representation with full sharing (TAF format).
fromATermString :: ATermConvertible t => String -> tSource
Convert from a textual ATerm representation.