type-set-0.1.0.0: Type set
Safe HaskellNone
LanguageHaskell2010

Data.OneOfThem

Synopsis

OneOfThem

Type

data OneOfThem (a :: Set Type) Source #

Instances

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

Defined in Data.OneOfThem

Methods

showsPrec :: Int -> OneOfThem ('Nil :: Set Type) -> ShowS #

show :: OneOfThem ('Nil :: Set Type) -> String #

showList :: [OneOfThem ('Nil :: Set Type)] -> ShowS #

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 :: Set Type) -> 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

Methods

expand :: OneOfThem ('Nil :: Set Type) -> OneOfThem as Source #

(>-) :: forall a (as :: Set Type). (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

(>--.)

(>--) :: forall a (as :: Set Type) b. InsertableFun a as (a :- as) => (a -> b) -> OneOfThemFun as b -> OneOfThemFun (a :- as) b infixr 5 Source #

Merge

class MergeableFun (as :: Set Type) (as' :: Set Type) (mrg :: Set Type) 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

Methods

mergeFun_ :: OneOfThemFun ('Nil :: Set Type) b -> OneOfThemFun ('Nil :: Set Type) b -> OneOfThemFun ('Nil :: Set Type) b

mergeFun :: forall (as :: Set Type) (as' :: Set Type) b. MergeableFun as as' (as :+: as') => OneOfThemFun as b -> OneOfThemFun as' b -> OneOfThemFun (as :+: as') b Source #