yoko-0.3.2.1: Generic Programming with Disbanded Data Types

Portabilitysee LANGUAGE pragmas (... GHC)
Stabilityexperimental
Maintainernicolas.frisby@gmail.com
Safe HaskellSafe-Infered

Data.Yoko.TypeBasics

Contents

Description

Some type-level programming basics.

Synopsis

Documentation

data Proxy a Source

A polykinded proxy.

Constructors

Proxy 

type Equal a b = IsEQ (Compare a b)Source

Convenient synonym. type Equal a b = IsEQ (Compare a b)

derive :: Name -> Q [Dec]Source

Template Haskell derivation for the type-spine and type-cereal packages' Spine and Serialize type families, which support generic instances of Compare.

Re-exports

Type-level Maybe

data Just x Source

type family IsJust x :: *Source

Returns a type-level boolean from type-booleans.

type family MaybePlus1 x y :: *Source

Type-level mplus for Maybe.

type family MaybeMap f x :: *Source

Type-level fmap for Maybe.

encode :: Serialize a => a -> Type

Encode uses the cereal package serializer to encode the value and then uses type-digits to reflect it as a type-level numeral.