Skip to content
Cinch
Packages/cinch-base/Prelude
SAMPLE API
MODULE REFERENCE

Prelude

Primitive types and the common vocabulary shared by the standard libraries.

SYNOPSIS

Types and classes

data Nat

An unbounded natural number. Arithmetic on Nat does not overflow.

CONSTRUCTORS

Zero :: Nat

The natural number zero.

Succ :: Nat -> Nat

The successor of a natural number.

opaque Ref region a

A reference that borrows a value for the lifetime of region.

effect Io region

An effect for interaction with an external environment.

Functions and values

id

function§Source ↗
id :: forall a. a -> a

Return the supplied value unchanged.

EXAMPLE

id 42
-- 42

const

function§Source ↗
const :: forall a b. a -> b -> a

Return the first argument and ignore the second.