aligned-foreignptr-0.1: An aligned ForeignPtr type

Foreign.ForeignPtr.Aligned

Description

A properly aligned ForeignPtr type. This can be currently achieved only by wasting some bytes.

Synopsis

Documentation

data AlignedForeignPtr a Source

The aligned ForeignPtr type

Instances

data Alignment Source

Should be a power of two.

Instances

align :: Int -> AlignmentSource

A "smart" constructor which checks whether the input is a power of two.