type-combinators-0.1.0.0: A collection of data types for type-level programming.

CopyrightCopyright (C) 2015 Kyle Carter
LicenseBSD3
MaintainerKyle Carter <kylcarte@indiana.edu>
Stabilityexperimental
PortabilityRankNTypes
Safe HaskellSafe
LanguageHaskell2010

Type.Family.Monoid

Description

Type-level Monoid, defined as an open type family.

Documentation

type family Mempty :: k Source

Instances

type Mempty [k] = Ø k Source 
type Mempty (Maybe k) = Nothing k Source 
type Mempty ((,) k k1) = (#) k k1 (Mempty k) (Mempty k1) Source

A type-level pair is a Monoid over its pairwise components.

type family a <> b :: k Source

Instances

type (<>) [k] a b = (++) k a b Source 
type (<>) (Maybe k) a b = (<|>) k a b Source 
type (<>) ((,) k k1) ((#) k k1 r a) ((#) k k1 s b) = (#) k k1 ((<>) k r s) ((<>) k1 a b) Source