fit-0.5.1: FIT file decoder

CopyrightCopyright 2014-2015, Matt Giles
LicenseModified BSD License (see LICENSE file)
Maintainermatt.w.giles@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Fit.Internal.Numbers

Contents

Description

Little-endian and big-endian parsers for signed and unsigned integers, and for single-precision and double-precision floating point numbers.

The parsers are tagged for endianness using the tools in Fit.Internal.Architecture.

Synopsis

Little-endian parsers

Big-endian parsers

Helpers

nByteIntLe :: (Integral a, Bits a) => Int -> Parser a Source

Parse n bytes and interpret them as a little-endian integer. The caller must ensure that the returned type is the correct size for the number of bytes parsed.

nByteIntBe :: (Integral a, Bits a) => Int -> Parser a Source

Parse n bytes and interpret them as a big-endian integer. The caller must ensure that the returned type is the correct size for the number of bytes parsed.