Community
Modules 50

Data.Text.Internal.Fusion.Size

experimental

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Size hints.

data Size

A size in UTF-8 code units (which is bytes).

Sizes

charSize :: Char -> Size

The Size of the given code point.

Querying sizes

smaller :: Size -> Size -> Size

Minimum of two size hints.

larger :: Size -> Size -> Size

Maximum of two size hints.

upperBound :: Int -> Size -> Int

Compute the maximum size from a size hint, if possible.

lowerBound :: Int -> Size -> Int

Compute the minimum size from a size hint, if possible.

compareSize :: Size -> Size -> Maybe Ordering

Determine the ordering relationship between two Sizes, or Nothing in the indeterminate case.

Instances

3
  • instance Eq Size
  • instance Show Size
  • instance Num Size
Maintainer
bos@serpentine.com
Portability
portable
Copyright
(c) Roman Leshchinskiy 2008, (c) Bryan O'Sullivan 2009
License
BSD-style
Build record and source files

Community contribution. The service has not verified this documentation. The generator reported 2 diagnostics.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-858b1951-web-1

Metadata snapshot: 0b0724abd14577f7a6c8172d62e3e1c0808feb114d4d379402e17f37e3c7801e

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.