linear-maps-0.6.1: Finite maps for linear use

Data.TypeInt

Contents

Description

Very simple type-level integers

Synopsis

Constructors

data Zero Source

Zero represents 0 at the type level

Instances

data Succ a Source

If a represents the natural number n at the type level then (Succ a) represents (1 + n) at the type level.

Instances

I a => I (Succ a) 

Predefined values

type I0 = ZeroSource

Conversion to Int

class I m whereSource

Conversion to Int is achieved by the I type class.

Methods

num :: m -> IntSource

induction :: m -> a -> (a -> a) -> aSource

induction' :: a Zero -> (forall i. a i -> a (Succ i)) -> a mSource

induction'' :: a Zero x -> (forall i. a i x -> a (Succ i) x) -> a m xSource

Instances

I Zero 
I a => I (Succ a)