Module frege.Prelude

Public interface for the various prelude modules

Imports

Table of Content

Definitions

printShow α ⇒ αIO ()

Print a value to the standard output writer.

This will come out UTF8 encoded.

printlnShow α ⇒ αIO ()

Print a value to the standard output stream and append a platform typical new line character.

This will come out UTF8 encoded.

putCharCharIO ()

write a character to IO.stdout

putStrStringIO ()

write a String to standard output (Haskell compatibility)

putStrLnStringIO ()

write a String and a new line to standard output (Haskell compatibility)

getCharIO Char

read a character from the standard input reader

getLineIO String

read a line from the standard input reader, end of line characters are removed.

getContentsIO String

The getContents operation returns all user input as a single string

getContentsOfReaderIO String

The getContentsOf operation returns all input from the supplied Reader as a single string.

After completion, the Reader is closed.

interact ∷ (StringString) → IO ()

The interact function takes a function of type String -> String as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

readFileStringIO String

The readFile function reads a file and returns the contents of the file as a string.

If the file doesn't exist, a FileNotFoundException will be thrown.

writeFileStringStringIO ()

Writes the String given as second argument to the file whose name is given as the first argument.

After completion, the file will be closed.

appendFileStringStringIO ()

Appends the String given as second argument to the file whose name is given as the first argument.

After completion, the file will be closed.

traceStringBool

unsafe trace, returns always false and can thus be used like

 fun x y
    | trace   ("x is " ++ show x) = undefined
    | traceLn ("y is " ++ show y) = undefined
    | otherwise = ......

Note that this imposes strictness on the traced data.

traceLnStringBool

same as trace but appends a line break

Instances

instance (Bounded a, Bounded b) ⇒ Bounded (a, b)

Member Functions

maxBound ∷ (Bounded β, Bounded α) ⇒ (β, α)
minBound ∷ (Bounded β, Bounded α) ⇒ (β, α)
instance (Bounded a, Bounded b, Bounded c) ⇒ Bounded (a, b, c)

Member Functions

maxBound ∷ (Bounded γ, Bounded β, Bounded α) ⇒ (γ, β, α)
minBound ∷ (Bounded β, Bounded α, Bounded γ) ⇒ (β, α, γ)
instance Enum Ordering

Member Functions

enumFromOrdering → [Ordering]

inherited from Enum.enumFrom

enumFromThenOrderingOrdering → [Ordering]

Function generated for derived instance.

enumFromThenToOrderingOrderingOrdering → [Ordering]

Function generated for derived instance.

enumFromToOrderingOrdering → [Ordering]

inherited from Enum.enumFromTo

fromIntOrdering

Function generated for derived instance.

ordOrderingInt

Function generated for derived instance.

predOrderingOrdering

Function generated for derived instance.

succOrderingOrdering

Function generated for derived instance.

instance (Eq a, Eq b) ⇒ Eq (a, b)

Member Functions

!= ∷ (Eq β, Eq α) ⇒ (β, α)(β, α)Bool
infix  7

inherited from Eq.!=

== ∷ (Eq β, Eq α) ⇒ (β, α)(β, α)Bool
infix  7

Function generated for derived instance.

hashCode ∷ (Eq β, Eq α) ⇒ (β, α)Int

Function generated for derived instance.

instance (Eq a, Eq b, Eq c) ⇒ Eq (a, b, c)

Member Functions

!= ∷ (Eq β, Eq α, Eq γ) ⇒ (β, α, γ)(β, α, γ)Bool
infix  7

inherited from Eq.!=

== ∷ (Eq γ, Eq β, Eq α) ⇒ (γ, β, α)(γ, β, α)Bool
infix  7

Function generated for derived instance.

hashCode ∷ (Eq α, Eq γ, Eq β) ⇒ (α, γ, β)Int

Function generated for derived instance.

instance (Eq a, Eq b) ⇒ Eq (a | b)

Member Functions

!= ∷ (Eq β, Eq α) ⇒ (β | α)(β | α)Bool
infix  7

inherited from Eq.!=

== ∷ (Eq α, Eq β) ⇒ (α | β)(α | β)Bool
infix  7

Function generated for derived instance.

hashCode ∷ (Eq α, Eq β) ⇒ (α | β)Int

Function generated for derived instance.

instance Eq Ordering

Member Functions

!=OrderingOrderingBool
infix  7

inherited from Eq.!=

==OrderingOrderingBool
infix  7

Function generated for derived instance.

hashCodeOrderingInt

Function generated for derived instance.

instance Ord ()

Member Functions

<()()Bool
infix  9

inherited from Ord.<

<=()()Bool
infix  9

inherited from Ord.<=

<=>()()Ordering
infix  8

Function generated for derived instance.

>()()Bool
infix  9

inherited from Ord.>

>=()()Bool
infix  9

inherited from Ord.>=

compare()()Ordering
infix  8

inherited from Ord.compare

max()()()

inherited from Ord.max

min()()()

inherited from Ord.min

instance (Ord a, Ord b) ⇒ Ord (a, b)

Member Functions

< ∷ (Ord β, Ord α) ⇒ (β, α)(β, α)Bool
infix  9

inherited from Ord.<

<= ∷ (Ord β, Ord α) ⇒ (β, α)(β, α)Bool
infix  9

inherited from Ord.<=

<=> ∷ (Ord β, Ord α) ⇒ (β, α)(β, α)Ordering
infix  8

Function generated for derived instance.

> ∷ (Ord β, Ord α) ⇒ (β, α)(β, α)Bool
infix  9

inherited from Ord.>

>= ∷ (Ord β, Ord α) ⇒ (β, α)(β, α)Bool
infix  9

inherited from Ord.>=

compare ∷ (Ord β, Ord α) ⇒ (β, α)(β, α)Ordering
infix  8

inherited from Ord.compare

max ∷ (Ord β, Ord α) ⇒ (β, α)(β, α) → (β, α)

inherited from Ord.max

min ∷ (Ord β, Ord α) ⇒ (β, α)(β, α) → (β, α)

inherited from Ord.min

instance (Ord a, Ord b, Ord c) ⇒ Ord (a, b, c)

Member Functions

< ∷ (Ord α, Ord γ, Ord β) ⇒ (α, γ, β)(α, γ, β)Bool
infix  9

inherited from Ord.<

<= ∷ (Ord β, Ord α, Ord γ) ⇒ (β, α, γ)(β, α, γ)Bool
infix  9

inherited from Ord.<=

<=> ∷ (Ord β, Ord α, Ord γ) ⇒ (β, α, γ)(β, α, γ)Ordering
infix  8

Function generated for derived instance.

> ∷ (Ord γ, Ord β, Ord α) ⇒ (γ, β, α)(γ, β, α)Bool
infix  9

inherited from Ord.>

>= ∷ (Ord α, Ord γ, Ord β) ⇒ (α, γ, β)(α, γ, β)Bool
infix  9

inherited from Ord.>=

compare ∷ (Ord α, Ord γ, Ord β) ⇒ (α, γ, β)(α, γ, β)Ordering
infix  8

inherited from Ord.compare

max ∷ (Ord β, Ord α, Ord γ) ⇒ (β, α, γ)(β, α, γ) → (β, α, γ)

inherited from Ord.max

min ∷ (Ord γ, Ord β, Ord α) ⇒ (γ, β, α)(γ, β, α) → (γ, β, α)

inherited from Ord.min

instance (Ord a, Ord b) ⇒ Ord (a | b)

Member Functions

< ∷ (Ord β, Ord α) ⇒ (β | α)(β | α)Bool
infix  9

inherited from Ord.<

<= ∷ (Ord β, Ord α) ⇒ (β | α)(β | α)Bool
infix  9

inherited from Ord.<=

<=> ∷ (Ord β, Ord α) ⇒ (β | α)(β | α)Ordering
infix  8

Function generated for derived instance.

> ∷ (Ord β, Ord α) ⇒ (β | α)(β | α)Bool
infix  9

inherited from Ord.>

>= ∷ (Ord β, Ord α) ⇒ (β | α)(β | α)Bool
infix  9

inherited from Ord.>=

compare ∷ (Ord β, Ord α) ⇒ (β | α)(β | α)Ordering
infix  8

inherited from Ord.compare

max ∷ (Ord β, Ord α) ⇒ (β | α)(β | α) → (β | α)

inherited from Ord.max

min ∷ (Ord β, Ord α) ⇒ (β | α)(β | α) → (β | α)

inherited from Ord.min

instance Ord Ordering

Member Functions

<OrderingOrderingBool
infix  9

inherited from Ord.<

<=OrderingOrderingBool
infix  9

inherited from Ord.<=

<=>OrderingOrderingOrdering
infix  8

Function generated for derived instance.

>OrderingOrderingBool
infix  9

inherited from Ord.>

>=OrderingOrderingBool
infix  9

inherited from Ord.>=

compareOrderingOrderingOrdering
infix  8

inherited from Ord.compare

maxOrderingOrderingOrdering

inherited from Ord.max

minOrderingOrderingOrdering

inherited from Ord.min

Functions and Values by Type

(StringString) → IO ()

interact

StringStringIO ()

appendFile, writeFile

StringIO String

readFile

StringIO ()

putStr, putStrLn

StringBool

trace, traceLn

ReaderIO String

getContentsOf

()()()

Ord_().min, Ord_().max

()()Bool

Ord_().>=, Ord_().<, Ord_().<=, Ord_().>

()()Ordering

Ord_().compare, Ord_().<=>

CharIO ()

putChar

IntOrdering

Enum_Ordering.from

OrderingOrderingOrdering → [Ordering]

Enum_Ordering.enumFromThenTo

OrderingOrdering → [Ordering]

Enum_Ordering.enumFromThen, Enum_Ordering.enumFromTo

OrderingOrderingBool

Eq_Ordering.!=, Eq_Ordering.==, Ord_Ordering.>=, Ord_Ordering.<, Ord_Ordering.<=, Ord_Ordering.>

OrderingOrderingOrdering

Ord_Ordering.min, Ord_Ordering.compare, Ord_Ordering.max, Ord_Ordering.<=>

Ordering → [Ordering]

Enum_Ordering.enumFrom

OrderingInt

Enum_Ordering.ord, Eq_Ordering.hashCode

OrderingOrdering

Enum_Ordering.succ, Enum_Ordering.pred

IO String

getContents, getLine

IO Char

getChar

Show α ⇒ α → IO ()

print, println

(Eq α, Eq β) ⇒ (α | β) → (α | β) → Bool

Eq_Either.==

(Eq α, Eq β) ⇒ (α | β) → Int

Eq_Either.hashCode

(Eq β, Eq α) ⇒ (β, α) → (β, α) → Bool

Eq_(,).!=, Eq_(,).==

(Eq β, Eq α) ⇒ (β, α) → Int

Eq_(,).hashCode

(Eq β, Eq α) ⇒ (β | α) → (β | α) → Bool

Eq_Either.!=

(Ord β, Ord α) ⇒ (β, α) → (β, α) → (β, α)

Ord_(,).min, Ord_(,).max

(Ord β, Ord α) ⇒ (β, α) → (β, α) → Bool

Ord_(,).>=, Ord_(,).<, Ord_(,).<=, Ord_(,).>

(Ord β, Ord α) ⇒ (β, α) → (β, α) → Ordering

Ord_(,).compare, Ord_(,).<=>

(Ord β, Ord α) ⇒ (β | α) → (β | α) → (β | α)

Ord_Either.min, Ord_Either.max

(Ord β, Ord α) ⇒ (β | α) → (β | α) → Bool

Ord_Either.>=, Ord_Either.<, Ord_Either.<=, Ord_Either.>

(Ord β, Ord α) ⇒ (β | α) → (β | α) → Ordering

Ord_Either.compare, Ord_Either.<=>

(Bounded β, Bounded α) ⇒ (β, α)

Bounded_(,).maxBound, Bounded_(,).minBound

(Eq α, Eq γ, Eq β) ⇒ (α, γ, β) → Int

Eq_(,,).hashCode

(Eq β, Eq α, Eq γ) ⇒ (β, α, γ) → (β, α, γ) → Bool

Eq_(,,).!=

(Eq γ, Eq β, Eq α) ⇒ (γ, β, α) → (γ, β, α) → Bool

Eq_(,,).==

(Ord α, Ord γ, Ord β) ⇒ (α, γ, β) → (α, γ, β) → Bool

Ord_(,,).>=, Ord_(,,).<

(Ord α, Ord γ, Ord β) ⇒ (α, γ, β) → (α, γ, β) → Ordering

Ord_(,,).compare

(Ord β, Ord α, Ord γ) ⇒ (β, α, γ) → (β, α, γ) → (β, α, γ)

Ord_(,,).max

(Ord β, Ord α, Ord γ) ⇒ (β, α, γ) → (β, α, γ) → Bool

Ord_(,,).<=

(Ord β, Ord α, Ord γ) ⇒ (β, α, γ) → (β, α, γ) → Ordering

Ord_(,,).<=>

(Ord γ, Ord β, Ord α) ⇒ (γ, β, α) → (γ, β, α) → (γ, β, α)

Ord_(,,).min

(Ord γ, Ord β, Ord α) ⇒ (γ, β, α) → (γ, β, α) → Bool

Ord_(,,).>

(Bounded β, Bounded α, Bounded γ) ⇒ (β, α, γ)

Bounded_(,,).minBound

(Bounded γ, Bounded β, Bounded α) ⇒ (γ, β, α)

Bounded_(,,).maxBound

Valid HTML 4.01 Strict