data-sword-0.2.0.3: Shorter binary words
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.ShortWord.TH

Description

Template Haskell utilities for generating short words declarations

Synopsis

Documentation

mkShortWord Source #

Arguments

:: String

Unsigned variant type name

-> String

Unsigned variant constructor name

-> String

Unsigned variant proxy name

-> String

Signed variant type name

-> String

Signed variant constructor name

-> String

Signed variant proxy name

-> Name

The underlying (unsigned) type

-> Int

The bit length

-> [Name]

List of instances for automatic derivation

-> Q [Dec] 

Declare signed and unsigned binary word types that use a subset of the bits of the specified underlying type. For each data type the following instances are declared: Typeable, Data, Eq, Ord, Bounded, Enum, Num, Real, Integral, Show, Read, Hashable, Ix, Bits, BinaryWord.