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

Safe HaskellSafe
LanguageHaskell2010

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).

Minimal complete definition

size

Methods

size :: a -> Int Source #

Instances

Sized IntSet Source # 

Methods

size :: IntSet -> Int Source #

Sized Permutation Source # 

Methods

size :: Permutation -> Int Source #

Sized TopLevelModuleName Source # 
Sized ModuleName Source # 

Methods

size :: ModuleName -> Int Source #

Sized QName Source # 

Methods

size :: QName -> Int Source #

Sized [a] Source # 

Methods

size :: [a] -> Int Source #

Sized (IntMap a) Source # 

Methods

size :: IntMap a -> Int Source #

Sized (Seq a) Source # 

Methods

size :: Seq a -> Int Source #

Sized (Set a) Source # 

Methods

size :: Set a -> Int Source #

Sized (HashSet a) Source # 

Methods

size :: HashSet a -> Int Source #

Sized (SizedThing a) Source #

Return the cached size.

Methods

size :: SizedThing a -> Int Source #

Sized (Tele a) Source #

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

Methods

size :: Tele a -> Int Source #

Sized a => Sized (Abs a) Source # 

Methods

size :: Abs a -> Int Source #

Sized (Map k a) Source # 

Methods

size :: Map k a -> Int Source #

Sized (HashMap k a) Source # 

Methods

size :: HashMap k a -> Int 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

Instances

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

Return the cached size.

Methods

size :: SizedThing a -> Int Source #

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

Cache the size of an object.