Library for converting ground terms to strings and vice versa.
Author: Michael Hanus
Version: April 2021
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: |