type-combinators-0.2.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 (Either k k1) = Left k k1 (Mempty 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 Mempty ((,,) k k1 k2) = (,,) k k1 k2 (Mempty k) (Mempty k1) (Mempty k2) Source 

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 (<>) (Either k k1) a b = (<|>) k k1 a b Source 
type (<>) ((,) k k1) ((#) k k1 r a) ((#) k k1 s b) = (#) k k1 ((<>) k r s) ((<>) k1 a b) Source 
type (<>) ((,,) k k1 k2) ((,,) k k1 k2 a b c) ((,,) k k1 k2 d e f) = (,,) k k1 k2 ((<>) k a d) ((<>) k1 b e) ((<>) k2 c f) Source