Library for converting ground terms to strings and vice versa.
Author: Michael Hanus
Version: April 2005
showTerm
:: a -> String
Transforms a ground(!) term into a string representation in standard prefix notation. |
showQTerm
:: a -> String
Transforms a ground(!) term into a string representation in standard prefix notation. |
readsUnqualifiedTerm
:: [String] -> String -> [(a,String)]
Transform a string containing a term in standard prefix notation without module qualifiers into the corresponding data term. |
readUnqualifiedTerm
:: [String] -> String -> a
Transforms a string containing a term in standard prefix notation without module qualifiers into the corresponding data term. |
readsTerm
:: String -> [(a,String)]
For backward compatibility. |
readTerm
:: String -> a
For backward compatibility. |
readsQTerm
:: String -> [(a,String)]
Transforms a string containing a term in standard prefix notation with qualified constructor names into the corresponding data term. |
readQTerm
:: String -> a
Transforms a string containing a term in standard prefix notation with qualified constructor names into the corresponding data term. |
readQTermFile
:: String -> IO a
Reads a file containing a string representation of a term in standard prefix notation and returns the corresponding data term. |
readQTermListFile
:: String -> IO [a]
Reads a file containing lines with string representations of terms of the same type and returns the corresponding list of data terms. |
writeQTermFile
:: String -> a -> IO ()
Writes a ground term into a file in standard prefix notation. |
writeQTermListFile
:: String -> [a] -> IO ()
Writes a list of ground terms into a file. |
Transforms a ground(!) term into a string representation
in standard prefix notation.
Thus, showTerm suspends until its argument is ground.
This function is similar to the prelude function |
Transforms a ground(!) term into a string representation
in standard prefix notation.
Thus, showTerm suspends until its argument is ground.
Note that this function differs from the prelude function |
Transform a string containing a 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 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: |
For backward compatibility. Should not be used since their use can be problematic in case of constructors with identical names in different modules. |
For backward compatibility. Should not be used since their use can be problematic in case of constructors with identical names in different modules. |
Transforms a string containing a term in standard prefix notation with qualified constructor names into the corresponding data term. 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 term in standard prefix notation with qualified constructor names into the corresponding data term. |
Reads a file containing a string representation of a term in standard prefix notation and returns the corresponding data term. |
Reads a file containing lines with string representations of terms of the same type and returns the corresponding list of data terms. |
Writes a ground term into a file in standard prefix notation.
|
Writes a list of ground terms into a file. Each term is written into a separate line which might be useful to modify the file with a standard text editor.
|