Library containing unsafe operations.
These operations should be carefully used (e.g., for testing or debugging).
These operations should not be used in application programs!
Author: Michael Hanus
Version: April 2005
Functions:
identicalVar
| isVar
| readAnyQExpression
| readAnyQTerm
| readAnyUnqualifiedTerm
| readsAnyQExpression
| readsAnyQTerm
| readsAnyUnqualifiedTerm
| showAnyExpression
| showAnyQExpression
| showAnyQTerm
| showAnyTerm
| spawnConstraint
| trace
| unsafePerformIO
|
Summary of exported functions:
|
unsafePerformIO :: IO a -> a
|
|
Performs and hides an I/O action in a computation (use with care!).
|
|
trace :: String -> a -> a
|
|
Prints the first argument as a side effect and behaves as identity on the
second argument.
|
|
spawnConstraint :: Success -> a -> a
|
|
Spawns a constraint and returns the second argument.
|
|
isVar :: a -> Bool
|
|
Tests whether the first argument evaluates to a currently unbound
variable (use with care!).
|
|
identicalVar :: a -> a -> Bool
|
|
Tests whether both arguments evaluate to the identical currently unbound
variable (use with care!).
|
|
showAnyTerm :: a -> String
|
|
Transforms the normal form of a term into a string representation
in standard prefix notation.
|
|
showAnyQTerm :: a -> String
|
|
Transforms the normal form of a term into a string representation
in standard prefix notation.
|
|
readsAnyUnqualifiedTerm :: [String] -> String -> [(a,String)]
|
|
Transform a string containing a term in standard prefix notation
without module qualifiers into the corresponding data term.
|
|
readAnyUnqualifiedTerm :: [String] -> String -> a
|
|
Transforms a string containing a term in standard prefix notation
without module qualifiers into the corresponding data term.
|
|
readsAnyQTerm :: String -> [(a,String)]
|
|
Transforms a string containing a term in standard prefix notation
with qualified constructor names into the corresponding data term.
|
|
readAnyQTerm :: String -> a
|
|
Transforms a string containing a term in standard prefix notation
with qualified constructor names into the corresponding data term.
|
|
showAnyExpression :: a -> String
|
|
Transforms any expression (even not in normal form) into a string representation
in standard prefix notation without module qualifiers.
|
|
showAnyQExpression :: a -> String
|
|
Transforms any expression (even not in normal form) into a string representation
in standard prefix notation with module qualifiers.
|
|
readsAnyQExpression :: String -> [(a,String)]
|
|
Transforms a string containing an expression in standard prefix notation
with qualified constructor names into the corresponding expression.
|
|
readAnyQExpression :: String -> a
|
|
Transforms a string containing an expression in standard prefix notation
with qualified constructor names into the corresponding expression.
|
|
Char
Prelude
unsafePerformIO :: IO a -> a
Performs and hides an I/O action in a computation (use with care!).
-
Further infos:
-
trace :: String -> a -> a
Prints the first argument as a side effect and behaves as identity on the
second argument.
spawnConstraint :: Success -> a -> a
Spawns a constraint and returns the second argument.
This function can be considered as defined by
"spawnConstraint c x | c = x".
However, the evaluation of the constraint and the right-hand side
are performed concurrently, i.e., a suspension of the constraint
does not imply a blocking of the right-hand side and the
right-hand side might be evaluated before the constraint is successfully
solved.
Thus, a computation might return a result even if some of the
spawned constraints are suspended (use the PAKCS/Curry2Prolog option
"+suspend" to show such suspended goals).
-
Further infos:
-
isVar :: a -> Bool
Tests whether the first argument evaluates to a currently unbound
variable (use with care!).
identicalVar :: a -> a -> Bool
Tests whether both arguments evaluate to the identical currently unbound
variable (use with care!).
For instance, identicalVar (id x) (fst (x,1)) evaluates to
True whereas identicalVar x y and
let x=1 in identicalVar x x evaluate to False
showAnyTerm :: a -> String
Transforms the normal form of a term into a string representation
in standard prefix notation.
Thus, showAnyTerm evaluates its argument to normal form.
This function is similar to the function ReadShowTerm.showTerm
but it also transforms logic variables into a string representation
that can be read back by Unsafe.read(s)AnyUnqualifiedTerm.
Thus, the result depends on the evaluation and binding status of
logic variables so that it should be used with care!
showAnyQTerm :: a -> String
Transforms the normal form of a term into a string representation
in standard prefix notation.
Thus, showAnyQTerm evaluates its argument to normal form.
This function is similar to the function ReadShowTerm.showQTerm
but it also transforms logic variables into a string representation
that can be read back by Unsafe.read(s)AnyQTerm.
Thus, the result depends on the evaluation and binding status of
logic variables so that it should be used with care!
readsAnyUnqualifiedTerm :: [String] -> String -> [(a,String)]
Transform a string containing a term in standard prefix notation
without module qualifiers into the corresponding data term.
The string might contain logical variable encodings produced by showAnyTerm.
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.
readAnyUnqualifiedTerm :: [String] -> String -> a
Transforms a string containing a term in standard prefix notation
without module qualifiers into the corresponding data term.
The string might contain logical variable encodings produced by showAnyTerm.
readsAnyQTerm :: String -> [(a,String)]
Transforms a string containing a term in standard prefix notation
with qualified constructor names into the corresponding data term.
The string might contain logical variable encodings produced by showAnyQTerm.
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.
readAnyQTerm :: String -> a
Transforms a string containing a term in standard prefix notation
with qualified constructor names into the corresponding data term.
The string might contain logical variable encodings produced by showAnyQTerm.
showAnyExpression :: a -> String
Transforms any expression (even not in normal form) into a string representation
in standard prefix notation without module qualifiers.
The result depends on the evaluation and binding status of
logic variables so that it should be used with care!
-
Further infos:
-
showAnyQExpression :: a -> String
Transforms any expression (even not in normal form) into a string representation
in standard prefix notation with module qualifiers.
The result depends on the evaluation and binding status of
logic variables so that it should be used with care!
-
Further infos:
-
readsAnyQExpression :: String -> [(a,String)]
Transforms a string containing an expression in standard prefix notation
with qualified constructor names into the corresponding expression.
The string might contain logical variable and defined function
encodings produced by showAnyQExpression.
In case of a successful parse, the result is a one element list
containing a pair of the expression and the remaining unparsed string.
readAnyQExpression :: String -> a
Transforms a string containing an expression in standard prefix notation
with qualified constructor names into the corresponding expression.
The string might contain logical variable and defined function
encodings produced by showAnyQExpression.
Generated by CurryDoc
(Version 0.4.1 of June 7, 2007) at Aug 28 15:27:20 2008