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 #

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

Minimal complete definition

size

Methods

size :: a -> Int #

Instances

Sized IntSet # 

Methods

size :: IntSet -> Int #

Sized Permutation # 

Methods

size :: Permutation -> Int #

Sized TopLevelModuleName # 
Sized ModuleName # 

Methods

size :: ModuleName -> Int #

Sized QName # 

Methods

size :: QName -> Int #

Sized [a] # 

Methods

size :: [a] -> Int #

Sized (IntMap a) # 

Methods

size :: IntMap a -> Int #

Sized (Seq a) # 

Methods

size :: Seq a -> Int #

Sized (Set a) # 

Methods

size :: Set a -> Int #

Sized (HashSet a) # 

Methods

size :: HashSet a -> Int #

Sized (SizedThing a) #

Return the cached size.

Methods

size :: SizedThing a -> Int #

Sized (Tele a) #

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

Methods

size :: Tele a -> Int #

Sized a => Sized (Abs a) # 

Methods

size :: Abs a -> Int #

Sized (Map k a) # 

Methods

size :: Map k a -> Int #

Sized (HashMap k a) # 

Methods

size :: HashMap k a -> Int #

data SizedThing a #

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

Methods

empty :: SizedThing a #

null :: SizedThing a -> Bool #

Sized (SizedThing a) #

Return the cached size.

Methods

size :: SizedThing a -> Int #

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

Cache the size of an object.