yoko-0.9: Generic Programming with Disbanded Data Types

Portabilitysee LANGUAGE pragmas (... GHC)
Stabilityexperimental
Maintainernicolas.frisby@gmail.com
Safe HaskellNone

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 (SpineCompare a b)Source

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

derive_data :: 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

type family IsJust x :: BoolSource

Returns a type-level boolean from type-booleans.

type family MaybePlus1 x y :: Maybe kSource

Type-level mplus for Maybe.

type family MaybeMap f x :: Maybe lSource

Type-level fmap for Maybe.

type family If c a b :: kSource

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.