type-set-0.1.0.0: Type set
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.OneOfThem

Synopsis

OneOfThem

Type

data OneOfThem :: Set Type -> Type Source #

Instances

Instances details
Show (OneOfThem ('Nil :: Set Type)) Source # 
Instance details

Defined in Data.OneOfThem

Single

pattern Singleton :: a -> OneOfThem (Singleton a) Source #

Multiple

Project

class Projectable (as :: Set Type) a Source #

Minimal complete definition

project

Instances

Instances details
Projectable ('Nil :: Set Type) a Source # 
Instance details

Defined in Data.OneOfThem

Methods

project :: OneOfThem 'Nil -> Maybe a Source #

Expand

class Expandable (as :: Set Type) (as' :: Set Type) Source #

Minimal complete definition

expand

Instances

Instances details
Expandable ('Nil :: Set Type) as Source # 
Instance details

Defined in Data.OneOfThem

(>-) :: (Expandable (Singleton a) (a :- as), Expandable as (a :- as)) => a -> [OneOfThem as] -> [OneOfThem (a :- as)] infixr 5 Source #

expand :: Expandable as as' => OneOfThem as -> OneOfThem as' Source #

OneOfThemFun

Type and Apply

data OneOfThemFun (as :: Set Type) b Source #

apply :: Applyable as => OneOfThemFun as b -> OneOfThem as -> b Source #

Single

pattern SingletonFun :: (a -> b) -> OneOfThemFun (Singleton a) b Source #

Insert

class InsertableFun a (as :: Set Type) (as' :: Set Type) Source #

Minimal complete definition

(>--.)

(>--) :: InsertableFun a as (a :- as) => (a -> b) -> OneOfThemFun as b -> OneOfThemFun (a :- as) b infixr 5 Source #

Merge

class MergeableFun as as' mrg Source #

Minimal complete definition

mergeFun_

Instances

Instances details
MergeableFun ('Nil :: Set Type) ('Nil :: Set Type) ('Nil :: Set Type) Source # 
Instance details

Defined in Data.OneOfThem

mergeFun :: MergeableFun as as' (as :+: as') => OneOfThemFun as b -> OneOfThemFun as' b -> OneOfThemFun (as :+: as') b Source #