nats-0.1: Haskell 98 natural numbers

Copyright(C) 2011 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Numeric.Natural.Internal

Description

This module exposes the potentially unsafe operations that are sometimes needed for efficiency: The Natural data constructor and unsafePred.

Synopsis

Documentation

newtype Natural #

Constructors

Natural 

Fields

Instances

Enum Natural # 
Eq Natural # 

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Integral Natural # 
Num Natural # 
Ord Natural # 
Read Natural # 
Real Natural # 
Show Natural # 
Ix Natural # 
Bits Natural # 
Whole Natural # 

class Integral n => Whole n where #

A refinement of Integral to represent types that do not contain negative numbers.

Minimal complete definition

toNatural, unsafePred

Methods

toNatural :: n -> Natural #

unsafePred :: n -> n #