data-dword-0.3.1.1: Stick two binary words together to get a bigger one

Safe Haskell | None
Language | Haskell2010

Data.DoubleWord.TH

Description

Template Haskell utilities for generating double words declarations

Synopsis

- mkDoubleWord :: String -> String -> Bang -> Name -> String -> String -> Bang -> Name -> Bang -> Name -> [Name] -> Q [Dec]
- mkUnpackedDoubleWord :: String -> Name -> String -> Name -> Name -> [Name] -> Q [Dec]

# Documentation

mkDoubleWord #

Arguments

:: String | Unsigned variant type name
-> String | Unsigned variant constructor name
-> Bang | Unsigned variant higher half strictness
-> Name | Unsigned variant higher half type
-> String | Signed variant type name
-> String | Signed variant constructor name
-> Bang | Signed variant higher half strictness
-> Name | Signed variant higher half type
-> Bang | Lower half strictness
-> Name | Lower half type
-> [Name] | List of instances for automatic derivation
-> Q [Dec] |

Declare signed and unsigned binary word types built from the specified low and high halves. The high halves must have less or equal bit-length than the lover half. For each data type the following instances are declared: `DoubleWord`, `Eq`, `Ord`, `Bounded`, `Enum`, `Num`, `Real`, `Integral`, `Show`, `Read`, `Hashable`, `Ix`, `Bits`, `BinaryWord`.

mkUnpackedDoubleWord #

Arguments

:: String | Unsigned variant type name
-> Name | Unsigned variant higher half type
-> String | Signed variant type name
-> Name | Signed variant higher half type
-> Name | Lower half type
-> [Name] | List of instances for automatic derivation
-> Q [Dec] |

``mkUnpackedDoubleWord` u uh s sh l` is an alias for ``mkDoubleWord` u u `Unpacked` uh s s `Unpacked` sh `Unpacked` l`