Agda-2.4.2.3: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell98

Agda.Utils.Size

Description

Collection size.

For TermSize see Agda.Syntax.Internal.

Synopsis

Documentation

class Sized a where Source

The size of a collection (i.e., its length).

Should fit into an Int. TODO: change to Int.

Methods

size :: Integral n => a -> n Source

Instances

Sized IntSet Source 
Sized ModuleName Source 
Sized QName Source 
Sized Permutation Source 
Sized [a] Source 
Sized (IntMap a) Source 
Sized (Set a) Source 
Sized (Seq a) Source 
Sized (SizedThing a) Source

Return the cached size.

Sized (Tele a) Source

The size of a telescope is its length (as a list).

Sized a => Sized (Abs a) Source 
Sized (Map k a) Source 

data SizedThing a Source

Thing decorated with its size. The thing should fit into main memory, thus, the size is an Int.

Constructors

SizedThing 

Fields

theSize :: !Int
 
sizedThing :: a
 

Instances

Null a => Null (SizedThing a) Source 
Sized (SizedThing a) Source

Return the cached size.

sizeThing :: Sized a => a -> SizedThing a Source

Cache the size of an object.