Module frege.Prelude

Public interface for the various prelude modules

Imports

Table of Content

Definitions

parseDecimal ∷ String → (NumberFormatException | Decimal)

for now

print ∷ Show 𝖆 ⇒ 𝖆 → IO ()

Print a value to the standard output writer.

This will come out UTF8 encoded.

println ∷ Show 𝖆 ⇒ 𝖆 → IO ()

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

This will come out UTF8 encoded.

putChar ∷ Char → IO ()

write a character to IO.stdout

putStr ∷ String → IO ()

write a String to standard output (Haskell compatibility)

putStrLn ∷ String → IO ()

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

getChar ∷ IO Char

read a character from the standard input reader

getLine ∷ IO String

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

getContents ∷ IO String

The getContents operation returns all user input as a single string

getContentsOf ∷ MutableIO Reader → IO String

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

After completion, the Reader is closed.

interact ∷ (String→String) → 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.

readFile ∷ String → IO 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.

writeFile ∷ String → String → IO ()

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.

appendFile ∷ String → String → IO ()

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.

trace ∷ String → Bool

nowarn: performUnsafe

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.

traceLn ∷ String → Bool

nowarn: performUnsafe

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

enumFrom ∷ Ordering → [Ordering]

inherited from Enum.enumFrom

enumFromThen ∷ Ordering → Ordering → [Ordering]

Function generated for derived instance.

enumFromThenTo ∷ Ordering → Ordering → Ordering → [Ordering]

Function generated for derived instance.

enumFromTo ∷ Ordering → Ordering → [Ordering]

inherited from Enum.enumFromTo

from ∷ Int → Ordering

Function generated for derived instance.

ord ∷ Ordering → Int

Function generated for derived instance.

pred ∷ Ordering → Ordering

Function generated for derived instance.

succ ∷ Ordering → Ordering

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

!= ∷ Ordering → Ordering → Bool
infix  7

inherited from Eq.!=

== ∷ Ordering → Ordering → Bool
infix  7

Function generated for derived instance.

hashCode ∷ Ordering → Int

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

< ∷ Ordering → Ordering → Bool
infix  9

inherited from Ord.<

<= ∷ Ordering → Ordering → Bool
infix  9

inherited from Ord.<=

<=> ∷ Ordering → Ordering → Ordering
infix  8

Function generated for derived instance.

> ∷ Ordering → Ordering → Bool
infix  9

inherited from Ord.>

>= ∷ Ordering → Ordering → Bool
infix  9

inherited from Ord.>=

compare ∷ Ordering → Ordering → Ordering
infix  8

inherited from Ord.compare

max ∷ Ordering → Ordering → Ordering

inherited from Ord.max

min ∷ Ordering → Ordering → Ordering

inherited from Ord.min

instance Show Decimal

Member Functions

display ∷ Decimal → String

inherited from Show.display

show ∷ Decimal → String
showChars ∷ Decimal → [Char]

inherited from Show.showChars

showList ∷ [Decimal] → String → String

inherited from Show.showList

showsPrec ∷ Int → Decimal → String → String

inherited from Show.showsPrec

showsub ∷ Decimal → String

inherited from Show.showsub

Functions and Values by Type

(String→String) → IO ()

interact

MutableIO Reader → IO String

getContentsOf

String → String → IO ()

appendFile, writeFile

String → (NumberFormatException | Decimal)

parseDecimal

String → IO String

readFile

String → IO ()

putStr, putStrLn

String → Bool

trace, traceLn

[Decimal] → String → String

Show_Decimal.showList

() → () → ()

Ord_().min, Ord_().max

() → () → Bool

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

() → () → Ordering

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

Char → IO ()

putChar

Int → Decimal → String → String

Show_Decimal.showsPrec

Int → Ordering

Enum_Ordering.from

Ordering → Ordering → Ordering → [Ordering]

Enum_Ordering.enumFromThenTo

Ordering → Ordering → [Ordering]

Enum_Ordering.enumFromThen, Enum_Ordering.enumFromTo

Ordering → Ordering → Bool

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

Ordering → Ordering → Ordering

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

Ordering → [Ordering]

Enum_Ordering.enumFrom

Ordering → Int

Enum_Ordering.ord, Eq_Ordering.hashCode

Ordering → Ordering

Enum_Ordering.succ, Enum_Ordering.pred

Decimal → String

Show_Decimal.showsub, Show_Decimal.display, Show_Decimal.show

Decimal → [Char]

Show_Decimal.showChars

IO String

getContents, getLine

IO Char

getChar

Show 𝖆 ⇒ 𝖆 → IO ()

print, println

(Eq 𝖇, Eq 𝖆) ⇒ (𝖇, 𝖆) → (𝖇, 𝖆) → Bool

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

(Eq 𝖇, Eq 𝖆) ⇒ (𝖇, 𝖆) → Int

Eq_(,).hashCode

(Eq 𝖇, Eq 𝖆) ⇒ (𝖇 | 𝖆) → (𝖇 | 𝖆) → Bool

Eq_Either.!=, Eq_Either.==

(Eq 𝖇, Eq 𝖆) ⇒ (𝖇 | 𝖆) → Int

Eq_Either.hashCode

(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 𝖆) ⇒ (𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆) → Bool

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

(Eq 𝖇, Eq 𝖈, Eq 𝖆) ⇒ (𝖇, 𝖈, 𝖆) → Int

Eq_(,,).hashCode

(Ord 𝖇, Ord 𝖈, Ord 𝖆) ⇒ (𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆)

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

(Ord 𝖇, Ord 𝖈, Ord 𝖆) ⇒ (𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆) → Bool

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

(Ord 𝖇, Ord 𝖈, Ord 𝖆) ⇒ (𝖇, 𝖈, 𝖆) → (𝖇, 𝖈, 𝖆) → Ordering

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

(Bounded 𝖇, Bounded 𝖈, Bounded 𝖆) ⇒ (𝖇, 𝖈, 𝖆)

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

Valid HTML 4.01 Strict