haskell-course-preludes- Small modules for a Haskell course in which Haskell is taught by implementing Prelude functionality.

Safe HaskellNone




Basic Types

type Int = IntSource

Arithmetic arithmetic and comparison

Integer arithmetic and comparison

(+) :: Int -> Int -> IntSource

(-) :: Int -> Int -> IntSource

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

mod :: Int -> Int -> IntSource

Double arithmetic and comparison

Type conversion functions

IO Requests and responses

run :: ([IOResponse] -> [IORequest]) -> IO ()Source

String operations

Other convenient operators

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

Function composition.

trace :: String -> a -> a

The trace function outputs the trace message given as its first argument, before returning the second argument as its result.

For example, this returns the value of f x but first outputs the message.

 trace ("calling f with x = " ++ show x) (f x)

The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.

module Data.List