Module frege.Prelude

Public interface for the various prelude modules

Imports

Table of Content

Definitions

parseDecimalString → (NumberFormatException | Decimal)

for now

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

getContentsOfMutableIO ReaderIO 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

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.

traceLnStringBool

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

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

instance Show Decimal

Member Functions

displayDecimalString

inherited from Show.display

showDecimalString
showCharsDecimal → [Char]

inherited from Show.showChars

showList[Decimal]StringString

inherited from Show.showList

showsPrecIntDecimalStringString

inherited from Show.showsPrec

showsubDecimalString

inherited from Show.showsub

Functions and Values by Type

(StringString) → IO ()

interact

MutableIO ReaderIO String

getContentsOf

StringStringIO ()

appendFile, writeFile

String → (NumberFormatException | Decimal)

parseDecimal

StringIO String

readFile

StringIO ()

putStr, putStrLn

StringBool

trace, traceLn

[Decimal] → StringString

Show_Decimal.showList

()()()

Ord_().min, Ord_().max

()()Bool

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

()()Ordering

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

CharIO ()

putChar

IntDecimalStringString

Show_Decimal.showsPrec

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

DecimalString

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