Library for converting ground terms to strings and vice versa.
Remark: The Data
type class constraint is removed for KiCS2
since this causes a memory leak (due to the non-deterministic method
aValue
) but it is not used in the implementation.
Author: Michael Hanus
Version: October 2024
showTerm
:: Data a => a -> String
Transforms a ground(!) data term into a string representation in standard prefix notation. |
readsUnqualifiedTerm
:: Data a => [String] -> String -> [(a,String)]
Transform a string containing a data term in standard prefix notation without module qualifiers into the corresponding data term. |
readUnqualifiedTerm
:: Data a => [String] -> String -> a
Transforms a string containing a data term in standard prefix notation without module qualifiers into the corresponding data term. |
Transforms a ground(!) data term into a string representation
in standard prefix notation.
Thus, |
Transform a string containing a data term in standard prefix notation without module qualifiers into the corresponding data term. The first argument is a non-empty list of module qualifiers that are tried to prefix the constructor in the string in order to get the qualified constructors (that must be defined in the current program!). In case of a successful parse, the result is a one element list containing a pair of the data term and the remaining unparsed string. |
Transforms a string containing a data term in standard prefix notation without module qualifiers into the corresponding data term. The first argument is a non-empty list of module qualifiers that are tried to prefix the constructor in the string in order to get the qualified constructors (that must be defined in the current program!).
Example: |