vector-0.12.3.1: Efficient Arrays
Copyright (c) Roman Leshchinskiy 2008-2010
License BSD-style
Maintainer Roman Leshchinskiy <rl@cse.unsw.edu.au>
Stability experimental
Portability portable
Safe Haskell Safe-Inferred
Language Haskell2010

Data.Vector.Fusion.Bundle.Size

Description

Size hints for streams.

Synopsis

Documentation

clampedSubtract :: Size -> Size -> Size Source #

Subtract two sizes with clamping to 0, for drop-like things

smaller :: Size -> Size -> Size Source #

Minimum of two size hints

smallerThan :: Int -> Size -> Size Source #

Select a safe smaller than known size.

larger :: Size -> Size -> Size Source #

Maximum of two size hints

toMax :: Size -> Size Source #

Convert a size hint to an upper bound

upperBound :: Size -> Maybe Int Source #

Compute the maximum size from a size hint if possible

lowerBound :: Size -> Int Source #

Compute the minimum size from a size hint