deriving-compat-0.5.6: Backports of GHC deriving extensions

Data.Ix.Deriving.Internal

Contents

Description

Exports functions to mechanically derive Ix instances.

Note: this is an internal module, and as such, the API presented here is not guaranteed to be stable, even between minor releases of this library.

Synopsis

# Ix

deriveIx :: Name -> Q [Dec] Source #

Generates a Ix instance declaration for the given data type or data family instance.

Generates a lambda expression which behaves like range (without requiring an Ix instance).

Generates a lambda expression which behaves like unsafeIndex (without requiring an Ix instance).

Generates a lambda expression which behaves like inRange (without requiring an Ix instance).