vector-0.3.1: Efficient Arrays

Portabilityportable
Stabilityexperimental
MaintainerRoman Leshchinskiy <rl@cse.unsw.edu.au>

Data.Vector.Fusion.Stream.Size

Description

Size hints

Synopsis

Documentation

data Size Source

Size hint

Constructors

Exact Int

Exact size

Max Int

Upper bound on the size

Unknown

Unknown size

Instances

smaller :: Size -> Size -> SizeSource

Minimum of two size hints

larger :: Size -> Size -> SizeSource

Maximum of two size hints

toMax :: Size -> SizeSource

Convert a size hint to an upper bound

upperBound :: Size -> Maybe IntSource

Compute the maximum size from a size hint if possible