Module "Prelude.curry"

The standard prelude of Curry. All top-level functions defined in this module are always available in any Curry program.


 Exported names:

Datatypes:
() | (,) | (,,) | (,,,) | (,,,,) | (,,,,,) | (,,,,,,) | (,,,,,,,) | (,,,,,,,,) | (,,,,,,,,,) | (,,,,,,,,,,) | (,,,,,,,,,,,) | (,,,,,,,,,,,,) | (,,,,,,,,,,,,,) | (,,,,,,,,,,,,,,) | Bool | Char | Either | Float | Int | IO | Maybe | Ordering | String | Success | []

Constructors:
() | (,) | (,,) | (,,,) | (,,,,) | (,,,,,) | (,,,,,,) | (,,,,,,,) | (,,,,,,,,) | (,,,,,,,,,) | (,,,,,,,,,,) | (,,,,,,,,,,,) | (,,,,,,,,,,,,) | (,,,,,,,,,,,,,) | (,,,,,,,,,,,,,,) | : | EQ | False | GT | Just | Left | LT | Nothing | Right | True | []

Functions:
!! | $ | $! | $!! | $# | $## | & | && | &> | * | + | ++ | - | . | /= | < | <= | =:<<= | =:<= | =:= | == | > | >= | >> | >>= | ? | all | and | any | appendFile | apply | best | break | browse | browseList | catchFail | chr | compare | concat | concatMap | cond | const | curry | div | done | doSolve | drop | dropWhile | either | elem | ensureNotFree | ensureSpine | enumFrom | enumFromThen | enumFromThenTo | enumFromTo | error | failed | failure | filter | findall | findfirst | flip | foldl | foldl1 | foldr | foldr1 | fst | getAllValues | getChar | getLine | getSomeValue | groundNormalForm | head | id | ifVar | if_then_else | inject | iterate | length | letrec | lines | lookup | map | mapIO | mapIO_ | max | maybe | min | mod | negate | normalForm | not | notElem | null | once | or | ord | otherwise | prim_appendFile | prim_chr | prim_error | prim_Int_div | prim_Int_minus | prim_Int_mod | prim_Int_plus | prim_Int_times | prim_ord | prim_putChar | prim_readFile | prim_readFileContents | prim_show | prim_writeFile | print | putChar | putStr | putStrLn | PEVAL | readFile | repeat | replicate | return | reverse | seq | sequenceIO | sequenceIO_ | show | snd | solveAll | solveAll2 | span | splitAt | success | tail | take | takeWhile | try | uncurry | unknown | unlines | unpack | until | unwords | unzip | unzip3 | words | writeFile | zip | zip3 | zipWith | zipWith3 | ||


 Summary of exported functions:

(.)  :: (a -> b) -> (c -> a) -> c -> b  deterministic 
          Function composition.
id  :: a -> a  deterministic 
          Identity function.
const  :: a -> b -> a  deterministic 
          Constant function.
curry  :: ((a,b) -> c) -> a -> b -> c  deterministic 
          Converts an uncurried function to a curried function.
uncurry  :: (a -> b -> c) -> (a,b) -> c  deterministic flexible
          Converts an curried function to a function on pairs.
flip  :: (a -> b -> c) -> b -> a -> c  deterministic 
          (flip f) is identical to f but with the order of arguments reversed.
until  :: (a -> Bool) -> (a -> a) -> a -> a  deterministic rigid
          Repeats application of a function until a predicate holds.
seq  :: a -> b -> b  deterministic 
          Evaluates the first argument to head normal form (which could also be a free variable) and returns the second argument.
ensureNotFree  :: a -> a  deterministic 
          Evaluates the argument to head normal form and returns it.
ensureSpine  :: [a] -> [a]  deterministic 
          Evaluates the argument to spine form and returns it.
($)  :: (a -> b) -> a -> b  deterministic 
          Right-associative application.
($!)  :: (a -> b) -> a -> b  deterministic 
          Right-associative application with strict evaluation of its argument.
($!!)  :: (a -> b) -> a -> b  deterministic 
          Right-associative application with strict evaluation of its argument to normal form.
($#)  :: (a -> b) -> a -> b  deterministic 
          Right-associative application with strict evaluation of its argument to a non-variable term.
($##)  :: (a -> b) -> a -> b  deterministic 
          Right-associative application with strict evaluation of its argument to ground normal form.
error  :: String -> a  deterministic 
          Aborts the execution with an error message.
prim_error  :: String -> a  deterministic 
          
failed  :: a  deterministic 
          A non-reducible polymorphic function.
(&&)  :: Bool -> Bool -> Bool  deterministic flexible
          Sequential conjunction on Booleans.
(||)  :: Bool -> Bool -> Bool  deterministic flexible
          Sequential disjunction on Booleans.
not  :: Bool -> Bool  deterministic flexible
          Negation on Booleans.
otherwise  :: Bool  deterministic 
          Useful name for the last condition in a sequence of conditional equations.
if_then_else  :: Bool -> a -> a -> a  deterministic rigid
          The standard conditional.
(==)  :: a -> a -> Bool  deterministic 
          Equality on finite ground data terms.
(/=)  :: a -> a -> Bool  deterministic 
          Disequality.
compare  :: a -> a -> Ordering  deterministic 
          Comparison of arbitrary ground data terms.
(<)  :: a -> a -> Bool  deterministic rigid
          Less-than on ground data terms.
(>)  :: a -> a -> Bool  deterministic rigid
          Greater-than on ground data terms.
(<=)  :: a -> a -> Bool  deterministic 
          Less-or-equal on ground data terms.
(>=)  :: a -> a -> Bool  deterministic 
          Greater-or-equal on ground data terms.
max  :: a -> a -> a  deterministic rigid
          Maximum of ground data terms.
min  :: a -> a -> a  deterministic rigid
          Minimum of ground data terms.
fst  :: (a,b) -> a  deterministic flexible
          Selects the first component of a pair.
snd  :: (a,b) -> b  deterministic flexible
          Selects the second component of a pair.
head  :: [a] -> a  deterministic flexible
          Computes the first element of a list.
tail  :: [a] -> [a]  deterministic flexible
          Computes the remaining elements of a list.
null  :: [a] -> Bool  deterministic flexible
          Is a list empty?
(++)  :: [a] -> [a] -> [a]  deterministic flexible
          Concatenates two lists.
length  :: [a] -> Int  deterministic flexible
          Computes the length of a list.
(!!)  :: [a] -> Int -> a  deterministic flexible+rigid
          List index (subscript) operator, head has index 0.
map  :: (a -> b) -> [a] -> [b]  deterministic flexible
          Map a function on all elements of a list.
foldl  :: (a -> b -> a) -> a -> [b] -> a  deterministic flexible
          Accumulates all list elements by applying a binary operator from left to right.
foldl1  :: (a -> a -> a) -> [a] -> a  deterministic flexible
          Accumulates a non-empty list from left to right.
foldr  :: (a -> b -> b) -> b -> [a] -> b  deterministic flexible
          Accumulates all list elements by applying a binary operator from right to left.
foldr1  :: (a -> a -> a) -> [a] -> a  deterministic flexible
          Accumulates a non-empty list from right to left:
filter  :: (a -> Bool) -> [a] -> [a]  deterministic flexible+rigid
          Filters all elements satisfying a given predicate in a list.
zip  :: [a] -> [b] -> [(a,b)]  deterministic flexible
          Joins two lists into one list of pairs.
zip3  :: [a] -> [b] -> [c] -> [(a,b,c)]  deterministic flexible
          Joins three lists into one list of triples.
zipWith  :: (a -> b -> c) -> [a] -> [b] -> [c]  deterministic flexible
          Joins two lists into one list by applying a combination function to corresponding pairs of elements.
zipWith3  :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]  deterministic flexible
          Joins three lists into one list by applying a combination function to corresponding triples of elements.
unzip  :: [(a,b)] -> ([a],[b])  deterministic flexible
          Transforms a list of pairs into a pair of lists.
unzip3  :: [(a,b,c)] -> ([a],[b],[c])  deterministic flexible
          Transforms a list of triples into a triple of lists.
concat  :: [[a]] -> [a]  deterministic 
          Concatenates a list of lists into one list.
concatMap  :: (a -> [b]) -> [a] -> [b]  deterministic 
          Maps a function from elements to lists and merges the result into one list.
iterate  :: (a -> a) -> a -> [a]  deterministic 
          Infinite list of repeated applications of a function f to an element x.
repeat  :: a -> [a]  deterministic 
          Infinite list where all elements have the same value.
replicate  :: Int -> a -> [a]  deterministic 
          List of length n where all elements have the same value.
take  :: Int -> [a] -> [a]  deterministic rigid
          Returns prefix of length n.
drop  :: Int -> [a] -> [a]  deterministic rigid
          Returns suffix without first n elements.
splitAt  :: Int -> [a] -> ([a],[a])  deterministic rigid
          (splitAt n xs) is equivalent to (take n xs, drop n xs)
takeWhile  :: (a -> Bool) -> [a] -> [a]  deterministic flexible+rigid
          Returns longest prefix with elements satisfying a predicate.
dropWhile  :: (a -> Bool) -> [a] -> [a]  deterministic flexible+rigid
          Returns suffix without takeWhile prefix.
span  :: (a -> Bool) -> [a] -> ([a],[a])  deterministic flexible+rigid
          (span p xs) is equivalent to (takeWhile p xs, dropWhile p xs)
break  :: (a -> Bool) -> [a] -> ([a],[a])  deterministic 
          (break p xs) is equivalent to (takeWhile (not.p) xs, dropWhile (not.p) xs).
lines  :: String -> [String]  deterministic flexible
          Breaks a string into a list of lines where a line is terminated at a newline character.
unlines  :: [String] -> String  deterministic 
          Concatenates a list of strings with terminating newlines.
words  :: String -> [String]  deterministic rigid
          Breaks a string into a list of words where the words are delimited by white spaces.
unwords  :: [String] -> String  deterministic rigid
          Concatenates a list of strings with a blank between two strings.
reverse  :: [a] -> [a]  deterministic 
          Reverses the order of all elements in a list.
and  :: [Bool] -> Bool  deterministic 
          Computes the conjunction of a Boolean list.
or  :: [Bool] -> Bool  deterministic 
          Computes the disjunction of a Boolean list.
any  :: (a -> Bool) -> [a] -> Bool  deterministic 
          Is there an element in a list satisfying a given predicate?
all  :: (a -> Bool) -> [a] -> Bool  deterministic 
          Is a given predicate satisfied by all elements in a list?
elem  :: a -> [a] -> Bool  deterministic 
          Element of a list?
notElem  :: a -> [a] -> Bool  deterministic 
          Not element of a list?
lookup  :: a -> [(a,b)] -> Maybe b  deterministic flexible+rigid
          Looks up a key in an association list.
enumFrom  :: Int -> [Int]  deterministic 
          Generates an infinite sequence of ascending integers.
enumFromThen  :: Int -> Int -> [Int]  deterministic 
          Generates an infinite sequence of integers with a particular in/decrement.
enumFromTo  :: Int -> Int -> [Int]  deterministic rigid
          Generates a sequence of ascending integers.
enumFromThenTo  :: Int -> Int -> Int -> [Int]  deterministic 
          Generates a sequence of integers with a particular in/decrement.
ord  :: Char -> Int  deterministic 
          Converts a character into its ASCII value.
prim_ord  :: Char -> Int  deterministic 
          
chr  :: Int -> Char  deterministic 
          Converts an ASCII value into a character.
prim_chr  :: Int -> Char  deterministic 
          
(+)  :: Int -> Int -> Int  deterministic 
          Adds two integers.
prim_Int_plus  :: Int -> Int -> Int  deterministic 
          
(-)  :: Int -> Int -> Int  deterministic 
          Subtracts two integers.
prim_Int_minus  :: Int -> Int -> Int  deterministic 
          
(*)  :: Int -> Int -> Int  deterministic 
          Multiplies two integers.
prim_Int_times  :: Int -> Int -> Int  deterministic 
          
div  :: Int -> Int -> Int  deterministic 
          Integer division.
prim_Int_div  :: Int -> Int -> Int  deterministic 
          
mod  :: Int -> Int -> Int  deterministic 
          Integer remainder.
prim_Int_mod  :: Int -> Int -> Int  deterministic 
          
negate  :: Int -> Int  deterministic 
          Unary minus.
(=:=)  :: a -> a -> Success  deterministic 
          The equational constraint.
success  :: Success  deterministic 
          The always satisfiable constraint.
(&)  :: Success -> Success -> Success  deterministic 
          Concurrent conjunction on constraints.
(&>)  :: Success -> a -> a  deterministic 
          Constrained expression.
maybe  :: a -> (b -> a) -> Maybe b -> a  deterministic flexible
          
either  :: (a -> b) -> (c -> b) -> Either a c -> b  deterministic flexible
          
(>>=)  :: IO a -> (a -> IO b) -> IO b  deterministic 
          Sequential composition of actions.
return  :: a -> IO a  deterministic 
          The empty action that directly returns its argument.
(>>)  :: IO a -> IO b -> IO b  deterministic 
          Sequential composition of actions.
done  :: IO ()  deterministic 
          The empty action that returns nothing.
putChar  :: Char -> IO ()  deterministic 
          An action that puts its character argument on standard output.
prim_putChar  :: Char -> IO ()  deterministic 
          
getChar  :: IO Char  deterministic 
          An action that reads a character from standard output and returns it.
readFile  :: String -> IO String  deterministic 
          An action that (lazily) reads a file and returns its contents.
prim_readFile  :: String -> IO String  deterministic 
          
prim_readFileContents  :: String -> String  deterministic 
          
writeFile  :: String -> String -> IO ()  deterministic 
          An action that writes a file.
prim_writeFile  :: String -> String -> IO ()  deterministic 
          
appendFile  :: String -> String -> IO ()  deterministic 
          An action that appends a string to a file.
prim_appendFile  :: String -> String -> IO ()  deterministic 
          
catchFail  :: IO a -> IO a -> IO a  deterministic 
          Catches a possible failure during the execution of an I/O action.
putStr  :: String -> IO ()  deterministic flexible
          Action to print a string on stdout.
putStrLn  :: String -> IO ()  deterministic 
          Action to print a string with a newline on stdout.
getLine  :: IO String  deterministic 
          Action to read a line from stdin.
show  :: a -> String  deterministic 
          Converts an arbitrary term into an external string representation.
prim_show  :: a -> String  deterministic 
          
print  :: a -> IO ()  deterministic 
          Converts a term into a string and prints it.
doSolve  :: Success -> IO ()  deterministic 
          Solves a constraint as an I/O action.
sequenceIO  :: [IO a] -> IO [a]  deterministic flexible
          Executes a sequence of I/O actions and collects all results in a list.
sequenceIO_  :: [IO a] -> IO ()  deterministic 
          Executes a sequence of I/O actions and ignores the results.
mapIO  :: (a -> IO b) -> [a] -> IO [b]  deterministic 
          Maps an I/O action function on a list of elements.
mapIO_  :: (a -> IO b) -> [a] -> IO ()  deterministic 
          Maps an I/O action function on a list of elements.
(?)  :: a -> a -> a  non-deterministic 
          Non-deterministic choice par excellence.
unknown  :: a  deterministic 
          Evaluates to a fresh free variable.
getAllValues  :: a -> IO [a]  deterministic 
          Gets all values of an expression (currently, via an incomplete depth-first strategy).
getSomeValue  :: a -> IO a  deterministic 
          Gets a value of an expression (currently, via an incomplete depth-first strategy).
try  :: (a -> Success) -> [a -> Success]  deterministic 
          Basic search control operator.
inject  :: (a -> Success) -> (a -> Success) -> a -> Success  deterministic 
          Inject operator which adds the application of the unary procedure p to the search variable to the search goal taken from Oz.
solveAll  :: (a -> Success) -> [a -> Success]  deterministic 
          Computes all solutions via a a depth-first strategy.
solveAll2  :: (a -> Success) -> [a -> Success]  deterministic 
          
once  :: (a -> Success) -> a -> Success  deterministic 
          Gets the first solution via a depth-first strategy.
best  :: (a -> Success) -> (a -> a -> Bool) -> [a -> Success]  deterministic 
          Gets the best solution via a depth-first strategy according to a specified operator that can always take a decision which of two solutions is better.
findall  :: (a -> Success) -> [a]  deterministic 
          Gets all solutions via a depth-first strategy and unpack the values from the lambda-abstractions.
findfirst  :: (a -> Success) -> a  deterministic 
          Gets the first solution via a depth-first strategy and unpack the values from the search goals.
browse  :: (a -> Success) -> IO ()  deterministic 
          Shows the solution of a solved constraint.
browseList  :: [a -> Success] -> IO ()  deterministic flexible
          Unpacks solutions from a list of lambda abstractions and write them to the screen.
unpack  :: (a -> Success) -> a  deterministic 
          Unpacks a solution's value from a (solved) search goal.
PEVAL  :: a -> a  deterministic 
          Identity function used by the partial evaluator to mark expressions to be partially evaluated.
normalForm  :: a -> a  deterministic 
          Evaluates the argument to normal form and returns it.
groundNormalForm  :: a -> a  deterministic rigid
          Evaluates the argument to ground normal form and returns it.
apply  :: (a -> b) -> a -> b  deterministic 
          
cond  :: Success -> a -> a  deterministic 
          
letrec  :: a -> a -> Success  deterministic 
          
(=:<=)  :: a -> a -> Success  deterministic 
          Non-strict equational constraint.
(=:<<=)  :: a -> a -> Success  deterministic 
          Non-strict equational constraint for linear function patterns.
ifVar  :: a -> b -> b -> b  deterministic 
          internal function to implement =:<=
failure  :: a -> b -> c  deterministic 
          internal operation to implement failure reporting

 Imported modules:


 Exported datatypes:

()

Constructors:

() :: ()


[]

Constructors:

[] :: [] a
: :: a -> [a] -> [] a


(,)

Constructors:

(,) :: a -> b -> (,) a b


(,,)

Constructors:

(,,) :: a -> b -> c -> (,,) a b c


(,,,)

Constructors:

(,,,) :: a -> b -> c -> d -> (,,,) a b c d


(,,,,)

Constructors:

(,,,,) :: a -> b -> c -> d -> e -> (,,,,) a b c d e


(,,,,,)

Constructors:

(,,,,,) :: a -> b -> c -> d -> e -> f -> (,,,,,) a b c d e f


(,,,,,,)

Constructors:

(,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> (,,,,,,) a b c d e f g


(,,,,,,,)

Constructors:

(,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> (,,,,,,,) a b c d e f g h


(,,,,,,,,)

Constructors:

(,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> (,,,,,,,,) a b c d e f g h i


(,,,,,,,,,)

Constructors:

(,,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> (,,,,,,,,,) a b c d e f g h i j


(,,,,,,,,,,)

Constructors:

(,,,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> (,,,,,,,,,,) a b c d e f g h i j k


(,,,,,,,,,,,)

Constructors:

(,,,,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> (,,,,,,,,,,,) a b c d e f g h i j k l


(,,,,,,,,,,,,)

Constructors:

(,,,,,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> (,,,,,,,,,,,,) a b c d e f g h i j k l m


(,,,,,,,,,,,,,)

Constructors:

(,,,,,,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> (,,,,,,,,,,,,,) a b c d e f g h i j k l m n


(,,,,,,,,,,,,,,)

Constructors:

(,,,,,,,,,,,,,,) :: a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m -> n -> o -> (,,,,,,,,,,,,,,) a b c d e f g h i j k l m n o


String

Type synonym: String = [Char]


Int

Constructors:


Float

Constructors:


Char

Constructors:


Bool

Constructors:

False :: Bool
True :: Bool


Ordering

Ordering type. Useful as a result of comparison functions.

Constructors:

LT :: Ordering
EQ :: Ordering
GT :: Ordering


Success

Constructors:


Maybe

Constructors:

Nothing :: Maybe a
Just :: a -> Maybe a


Either

Constructors:

Left :: a -> Either a b
Right :: b -> Either a b


IO

Constructors:



 Exported functions:

(.) :: (a -> b) -> (c -> a) -> c -> b  deterministic 

Function composition.

Further infos:
  • defined as right-associative infix operator with precedence 9

id :: a -> a  deterministic 

Identity function.

Further infos:
  • solution complete, i.e., able to compute all solutions

const :: a -> b -> a  deterministic 

Constant function.

Further infos:
  • solution complete, i.e., able to compute all solutions

curry :: ((a,b) -> c) -> a -> b -> c  deterministic 

Converts an uncurried function to a curried function.


uncurry :: (a -> b -> c) -> (a,b) -> c  deterministic flexible

Converts an curried function to a function on pairs.


flip :: (a -> b -> c) -> b -> a -> c  deterministic 

(flip f) is identical to f but with the order of arguments reversed.


until :: (a -> Bool) -> (a -> a) -> a -> a  deterministic rigid

Repeats application of a function until a predicate holds.

Further infos:
  • incompletely defined

seq :: a -> b -> b  deterministic 

Evaluates the first argument to head normal form (which could also be a free variable) and returns the second argument.

Further infos:
  • defined as right-associative infix operator with precedence 0
  • externally defined

ensureNotFree :: a -> a  deterministic 

Evaluates the argument to head normal form and returns it. Suspends until the result is bound to a non-variable term.

Further infos:
  • externally defined

ensureSpine :: [a] -> [a]  deterministic 

Evaluates the argument to spine form and returns it. Suspends until the result is bound to a non-variable spine.


($) :: (a -> b) -> a -> b  deterministic 

Right-associative application.

Further infos:
  • defined as right-associative infix operator with precedence 0

($!) :: (a -> b) -> a -> b  deterministic 

Right-associative application with strict evaluation of its argument.

Further infos:
  • defined as right-associative infix operator with precedence 0

($!!) :: (a -> b) -> a -> b  deterministic 

Right-associative application with strict evaluation of its argument to normal form.

Further infos:
  • defined as right-associative infix operator with precedence 0

($#) :: (a -> b) -> a -> b  deterministic 

Right-associative application with strict evaluation of its argument to a non-variable term.

Further infos:
  • defined as right-associative infix operator with precedence 0

($##) :: (a -> b) -> a -> b  deterministic 

Right-associative application with strict evaluation of its argument to ground normal form.

Further infos:
  • defined as right-associative infix operator with precedence 0

error :: String -> a  deterministic 

Aborts the execution with an error message.


prim_error :: String -> a  deterministic 

Further infos:
  • externally defined

failed :: a  deterministic 

A non-reducible polymorphic function. It is useful to express a failure in a search branch of the execution. It could be defined by: failed = head []

Further infos:
  • externally defined

(&&) :: Bool -> Bool -> Bool  deterministic flexible

Sequential conjunction on Booleans.

Further infos:
  • defined as right-associative infix operator with precedence 3
  • solution complete, i.e., able to compute all solutions

(||) :: Bool -> Bool -> Bool  deterministic flexible

Sequential disjunction on Booleans.

Further infos:
  • defined as right-associative infix operator with precedence 2
  • solution complete, i.e., able to compute all solutions

not :: Bool -> Bool  deterministic flexible

Negation on Booleans.

Further infos:
  • solution complete, i.e., able to compute all solutions

otherwise :: Bool  deterministic 

Useful name for the last condition in a sequence of conditional equations.

Further infos:
  • solution complete, i.e., able to compute all solutions

if_then_else :: Bool -> a -> a -> a  deterministic rigid

The standard conditional. It suspends if the condition is a free variable.


(==) :: a -> a -> Bool  deterministic 

Equality on finite ground data terms.

Further infos:
  • defined as non-associative infix operator with precedence 4
  • externally defined

(/=) :: a -> a -> Bool  deterministic 

Disequality.

Further infos:
  • defined as non-associative infix operator with precedence 4

compare :: a -> a -> Ordering  deterministic 

Comparison of arbitrary ground data terms. Data constructors are compared in the order of their definition in the datatype declarations and recursively in the arguments.

Further infos:
  • externally defined

(<) :: a -> a -> Bool  deterministic rigid

Less-than on ground data terms.

Further infos:
  • defined as non-associative infix operator with precedence 4
  • incompletely defined

(>) :: a -> a -> Bool  deterministic rigid

Greater-than on ground data terms.

Further infos:
  • defined as non-associative infix operator with precedence 4
  • incompletely defined

(<=) :: a -> a -> Bool  deterministic 

Less-or-equal on ground data terms.

Further infos:
  • defined as non-associative infix operator with precedence 4

(>=) :: a -> a -> Bool  deterministic 

Greater-or-equal on ground data terms.

Further infos:
  • defined as non-associative infix operator with precedence 4

max :: a -> a -> a  deterministic rigid

Maximum of ground data terms.

Further infos:
  • incompletely defined

min :: a -> a -> a  deterministic rigid

Minimum of ground data terms.

Further infos:
  • incompletely defined

fst :: (a,b) -> a  deterministic flexible

Selects the first component of a pair.

Further infos:
  • solution complete, i.e., able to compute all solutions

snd :: (a,b) -> b  deterministic flexible

Selects the second component of a pair.

Further infos:
  • solution complete, i.e., able to compute all solutions

head :: [a] -> a  deterministic flexible

Computes the first element of a list.

Further infos:
  • incompletely defined
  • solution complete, i.e., able to compute all solutions

tail :: [a] -> [a]  deterministic flexible

Computes the remaining elements of a list.

Further infos:
  • incompletely defined
  • solution complete, i.e., able to compute all solutions

null :: [a] -> Bool  deterministic flexible

Is a list empty?

Further infos:
  • solution complete, i.e., able to compute all solutions

(++) :: [a] -> [a] -> [a]  deterministic flexible

Concatenates two lists. Since it is flexible, it could be also used to split a list into two sublists etc.

Further infos:
  • defined as right-associative infix operator with precedence 5
  • solution complete, i.e., able to compute all solutions

length :: [a] -> Int  deterministic flexible

Computes the length of a list.


(!!) :: [a] -> Int -> a  deterministic flexible+rigid

List index (subscript) operator, head has index 0.

Further infos:
  • defined as left-associative infix operator with precedence 9
  • incompletely defined

map :: (a -> b) -> [a] -> [b]  deterministic flexible

Map a function on all elements of a list.


foldl :: (a -> b -> a) -> a -> [b] -> a  deterministic flexible

Accumulates all list elements by applying a binary operator from left to right. Thus, foldl f z [x1,x2,...,xn] = (...((z `f` x1) `f` x2) ...) `f` xn


foldl1 :: (a -> a -> a) -> [a] -> a  deterministic flexible

Accumulates a non-empty list from left to right.

Further infos:
  • incompletely defined

foldr :: (a -> b -> b) -> b -> [a] -> b  deterministic flexible

Accumulates all list elements by applying a binary operator from right to left. Thus, foldr f z [x1,x2,...,xn] = (x1 `f` (x2 `f` ... (xn `f` z)...))


foldr1 :: (a -> a -> a) -> [a] -> a  deterministic flexible

Accumulates a non-empty list from right to left:

Further infos:
  • incompletely defined

filter :: (a -> Bool) -> [a] -> [a]  deterministic flexible+rigid

Filters all elements satisfying a given predicate in a list.

Further infos:
  • incompletely defined

zip :: [a] -> [b] -> [(a,b)]  deterministic flexible

Joins two lists into one list of pairs. If one input list is shorter than the other, the additional elements of the longer list are discarded.

Further infos:
  • solution complete, i.e., able to compute all solutions

zip3 :: [a] -> [b] -> [c] -> [(a,b,c)]  deterministic flexible

Joins three lists into one list of triples. If one input list is shorter than the other, the additional elements of the longer lists are discarded.

Further infos:
  • solution complete, i.e., able to compute all solutions

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]  deterministic flexible

Joins two lists into one list by applying a combination function to corresponding pairs of elements. Thus zip = zipWith (,)


zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]  deterministic flexible

Joins three lists into one list by applying a combination function to corresponding triples of elements. Thus zip3 = zipWith3 (,,)


unzip :: [(a,b)] -> ([a],[b])  deterministic flexible

Transforms a list of pairs into a pair of lists.

Further infos:
  • solution complete, i.e., able to compute all solutions

unzip3 :: [(a,b,c)] -> ([a],[b],[c])  deterministic flexible

Transforms a list of triples into a triple of lists.

Further infos:
  • solution complete, i.e., able to compute all solutions

concat :: [[a]] -> [a]  deterministic 

Concatenates a list of lists into one list.


concatMap :: (a -> [b]) -> [a] -> [b]  deterministic 

Maps a function from elements to lists and merges the result into one list.


iterate :: (a -> a) -> a -> [a]  deterministic 

Infinite list of repeated applications of a function f to an element x. Thus, iterate f x = [x, f x, f (f x),...]


repeat :: a -> [a]  deterministic 

Infinite list where all elements have the same value. Thus, repeat x = [x, x, x,...]

Further infos:
  • solution complete, i.e., able to compute all solutions

replicate :: Int -> a -> [a]  deterministic 

List of length n where all elements have the same value.


take :: Int -> [a] -> [a]  deterministic rigid

Returns prefix of length n.

Further infos:
  • incompletely defined

drop :: Int -> [a] -> [a]  deterministic rigid

Returns suffix without first n elements.

Further infos:
  • incompletely defined

splitAt :: Int -> [a] -> ([a],[a])  deterministic rigid

(splitAt n xs) is equivalent to (take n xs, drop n xs)

Further infos:
  • incompletely defined

takeWhile :: (a -> Bool) -> [a] -> [a]  deterministic flexible+rigid

Returns longest prefix with elements satisfying a predicate.

Further infos:
  • incompletely defined

dropWhile :: (a -> Bool) -> [a] -> [a]  deterministic flexible+rigid

Returns suffix without takeWhile prefix.

Further infos:
  • incompletely defined

span :: (a -> Bool) -> [a] -> ([a],[a])  deterministic flexible+rigid

(span p xs) is equivalent to (takeWhile p xs, dropWhile p xs)

Further infos:
  • incompletely defined

break :: (a -> Bool) -> [a] -> ([a],[a])  deterministic 

(break p xs) is equivalent to (takeWhile (not.p) xs, dropWhile (not.p) xs). Thus, it breaks a list at the first occurrence of an element satisfying p.


lines :: String -> [String]  deterministic flexible

Breaks a string into a list of lines where a line is terminated at a newline character. The resulting lines do not contain newline characters.


unlines :: [String] -> String  deterministic 

Concatenates a list of strings with terminating newlines.


words :: String -> [String]  deterministic rigid

Breaks a string into a list of words where the words are delimited by white spaces.


unwords :: [String] -> String  deterministic rigid

Concatenates a list of strings with a blank between two strings.

Further infos:
  • incompletely defined

reverse :: [a] -> [a]  deterministic 

Reverses the order of all elements in a list.


and :: [Bool] -> Bool  deterministic 

Computes the conjunction of a Boolean list.


or :: [Bool] -> Bool  deterministic 

Computes the disjunction of a Boolean list.


any :: (a -> Bool) -> [a] -> Bool  deterministic 

Is there an element in a list satisfying a given predicate?


all :: (a -> Bool) -> [a] -> Bool  deterministic 

Is a given predicate satisfied by all elements in a list?


elem :: a -> [a] -> Bool  deterministic 

Element of a list?

Further infos:
  • defined as non-associative infix operator with precedence 4

notElem :: a -> [a] -> Bool  deterministic 

Not element of a list?

Further infos:
  • defined as non-associative infix operator with precedence 4

lookup :: a -> [(a,b)] -> Maybe b  deterministic flexible+rigid

Looks up a key in an association list.

Further infos:
  • incompletely defined

enumFrom :: Int -> [Int]  deterministic 

Generates an infinite sequence of ascending integers.


enumFromThen :: Int -> Int -> [Int]  deterministic 

Generates an infinite sequence of integers with a particular in/decrement.


enumFromTo :: Int -> Int -> [Int]  deterministic rigid

Generates a sequence of ascending integers.

Further infos:
  • incompletely defined

enumFromThenTo :: Int -> Int -> Int -> [Int]  deterministic 

Generates a sequence of integers with a particular in/decrement.


ord :: Char -> Int  deterministic 

Converts a character into its ASCII value.


prim_ord :: Char -> Int  deterministic 

Further infos:
  • externally defined

chr :: Int -> Char  deterministic 

Converts an ASCII value into a character.


prim_chr :: Int -> Char  deterministic 

Further infos:
  • externally defined

(+) :: Int -> Int -> Int  deterministic 

Adds two integers.

Further infos:
  • defined as left-associative infix operator with precedence 6

prim_Int_plus :: Int -> Int -> Int  deterministic 

Further infos:
  • externally defined

(-) :: Int -> Int -> Int  deterministic 

Subtracts two integers.

Further infos:
  • defined as left-associative infix operator with precedence 6

prim_Int_minus :: Int -> Int -> Int  deterministic 

Further infos:
  • externally defined

(*) :: Int -> Int -> Int