Skip to content

StdOverloaded

This module can be imported directly or as a part of the StdEnv module. It provides definitions for important classes in CLEAN.

Visit StdOverloaded on Cloogle for source code of this module.

Unit classes

zero

Declaration

// CLEAN

class zero T
where
    zero :: T

Definition

Defines the additive identity on type T.

one

Declaration

// CLEAN

class one T
where
    one :: T

Definition

Defines the multiplicative identity on type T.


Manipulation operation classes

Negation

Declaration

// CLEAN

class ~ T
where
    ~ :: T -> T

Definition

Defines the negation operation on type T.

Slicing

Declaration

// CLEAN

class % T
where
    (%) infixl 9 :: T (Int, Int) -> T

Definition

Defines the slicing operation on type T.

Concatenation

Declaration

// CLEAN

class +++ T
where
    (+++) infixl 5 :: T T -> T

Definition

Defines the concatenation operation on type T.


Math operation classes

Addition

Declaration

// CLEAN

class + T
where
    (+) infixl 6 :: T T -> T

Definition

Defines the addition operation on type T.

Subtraction

Declaration

// CLEAN

class + T
where
    (-) infixl 6 :: T T -> T

Definition

Defines the subtraction operation on type T.

Multiplication

Declaration

// CLEAN

class * T
where
    (*) infixl 7 :: T T -> T

Definition

Defines the multiplication operation on type T.

Division

Declaration

// CLEAN

class / T
where
    (/) infixl 7 :: T T -> T

Definition

Defines the division operation on type T.

Reminder division

Declaration

// CLEAN

class rem T
where
    (rem) infixl 7 :: T T -> T

Definition

Defines the reminder division operation on type T.

Modulo

Declaration

// CLEAN

class mod T
where
    (mod) infixl 7 :: T T -> T

Definition

Defines the modulo operation on type T.

Exponentiation

Declaration

// CLEAN

class ^ T
where
    (^) infixl 7 :: T T -> T

Definition

Defines the exponentiation operation on type T.


Math function classes

inc

Declaration

// CLEAN

class inc T
where
    inc :: T -> T

Definition

Defines unit increment on type T.

dec

Declaration

// CLEAN

class dec T
where
    dec :: T -> T

Definition

Defines unit decrement on type T.

gcd

Declaration

// CLEAN

class gcd T
where
    gcd :: T T -> T

Definition

Defines the greatest common divisor operation on type T.

lcm

Declaration

// CLEAN

class lcm T
where
    lcm :: T T -> T

Definition

Defines the least common multiple operation on type T.

abs

Declaration

// CLEAN

class abs T
where
    abs :: T -> T

Definition

Defines the absolute value function on type T.

sign

Declaration

// CLEAN

class sign T
where
    sign :: T -> Int

Definition

Defines the sign function on type T.

ln

Declaration

// CLEAN

class ln T
where
    ln :: T -> T

Definition

Defines the natural logarithm function on type T.

exp

Declaration

// CLEAN

class exp T
where
    exp :: T -> T

Definition

Defines the exponential function on type T.

sqrt

Declaration

// CLEAN

class sqrt T
where
    sqrt :: T -> T

Definition

Defines the square root function on type T.

log10

Declaration

// CLEAN

class log10 T
where
    log10 :: T -> T

Definition

Defines the base-ten logarithm function on type T.


Trigonometric function classes

sin

Declaration

// CLEAN

class sin T
where
    sin :: T -> T

Definition

Defines the sine function on type T.

cos

Declaration

// CLEAN

class cos T
where
    cos :: T -> T

Definition

Defines the cosine function on type T.

tan

Declaration

// CLEAN

class tan T
where
    tan :: T -> T

Definition

Defines the tangent function on type T.

asin

Declaration

// CLEAN

class asin T
where
    asin :: T -> T

Definition

Defines the inverse of sine function on type T.

acos

Declaration

// CLEAN

class acos T
where
    acos :: T -> T

Definition

Defines the inverse of cosine function on type T.

atan

Declaration

// CLEAN

class atan T
where
    atan :: T -> T

Definition

Defines the inverse of tangent function on type T.

sinh

Declaration

// CLEAN

class sinh T
where
    sinh :: T -> T

Definition

Defines the hyperbolic sine function on type T.

cosh

Declaration

// CLEAN

class cosh T
where
    cosh :: T -> T

Definition

Defines the hyperbolic cosine function on type T.

tanh

Declaration

// CLEAN

class tanh T
where
    tanh :: T -> T

Definition

Defines the hyperbolic tangent function on type T.

asinh

Declaration

// CLEAN

class asinh T
where
    asinh :: T -> T

Definition

Defines the inverse of hyperbolic sine function on type T.

acosh

Declaration

// CLEAN

class acosh T
where
    acosh :: T -> T

Definition

Defines the inverse of hyperbolic cosine function on type T.

atanh

Declaration

// CLEAN

class atanh T
where
    atanh :: T -> T

Definition

Defines the inverse of hyperbolic tangent function on type T.


Validator function classes

isEven

Declaration

// CLEAN

class isEven T
where
    isEven :: T -> Bool

Definition

Defines the isEven function on type T.

isOdd

Declaration

// CLEAN

class isOdd T
where
    isOdd :: T -> Bool

Definition

Defines the isOdd function on type T.


Property function classes

length

Declaration

// CLEAN

class length T
where
    length :: (T a) -> Int

Definition

Defines the length function on type T.

Type conversion function classes

toInt

Declaration

// CLEAN

class toInt T
where
    toInt :: T -> Int

Definition

Defines conversion from type T to integer.

toReal

Declaration

// CLEAN

class toReal T
where
    toReal :: T -> Real

Definition

Defines conversion from type T to real numbers.

toChar

Declaration

// CLEAN

class toChar T
where
    toChar :: T -> Char

Definition

Defines conversion from type T to character.

toBool

Declaration

// CLEAN

class toBool T
where
    toBool :: T -> Bool

Definition

Defines conversion from type T to Boolean.

toString

Declaration

// CLEAN

class toString T
where
    toString :: T -> String

Definition

Defines conversion from type T to string.

fromInt

Declaration

// CLEAN

class fromInt T
where
    fromInt :: Int -> T

Definition

Defines conversion from integer to type T.

fromReal

Declaration

// CLEAN

class fromReal T
where
    fromReal :: Real -> T

Definition

Defines conversion from real number to type T.

fromChar

Declaration

// CLEAN

class fromChar T
where
    fromChar :: Char -> T

Definition

Defines conversion from character to type T.

fromBool

Declaration

// CLEAN

class fromBool T
where
    fromBool :: Bool -> T

Definition

Defines conversion from Boolean to type T.

fromString

Declaration

// CLEAN

class fromString T
where
    fromString :: String -> T

Definition

Defines conversion from string to type T.

Relational operation classes

Equality

Declaration

// CLEAN

class == T
where
    (==) infixl 4 :: T T -> T

Definition

Defines the equality operation on type T.

Less than

Declaration

// CLEAN

class < T
where
    (<) infixl 4 :: T T -> T

Definition

Defines the less than operation on type T.