Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data OneOfThem :: Set Type -> Type
- pattern Singleton :: a -> OneOfThem (Singleton a)
- unSingleton :: OneOfThem (Singleton a) -> a
- class Projectable (as :: Set Type) a
- project :: Projectable as a => OneOfThem as -> Maybe a
- class Expandable (as :: Set Type) (as' :: Set Type)
- (>-) :: (Expandable (Singleton a) (a :- as), Expandable as (a :- as)) => a -> [OneOfThem as] -> [OneOfThem (a :- as)]
- expand :: Expandable as as' => OneOfThem as -> OneOfThem as'
- data OneOfThemFun (as :: Set Type) b
- apply :: Applyable as => OneOfThemFun as b -> OneOfThem as -> b
- pattern SingletonFun :: (a -> b) -> OneOfThemFun (Singleton a) b
- class InsertableFun a (as :: Set Type) (as' :: Set Type)
- (>--) :: InsertableFun a as (a :- as) => (a -> b) -> OneOfThemFun as b -> OneOfThemFun (a :- as) b
- class MergeableFun as as' mrg
- mergeFun :: MergeableFun as as' (as :+: as') => OneOfThemFun as b -> OneOfThemFun as' b -> OneOfThemFun (as :+: as') b
OneOfThem
Type
Single
unSingleton :: OneOfThem (Singleton a) -> a Source #
Multiple
Project
class Projectable (as :: Set Type) a Source #
Expand
(>-) :: (Expandable (Singleton a) (a :- as), Expandable as (a :- as)) => a -> [OneOfThem as] -> [OneOfThem (a :- as)] infixr 5 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
(>--) :: InsertableFun a as (a :- as) => (a -> b) -> OneOfThemFun as b -> OneOfThemFun (a :- as) b infixr 5 Source #
Merge
class MergeableFun as as' mrg Source #
mergeFun_
Instances
MergeableFun ('Nil :: Set Type) ('Nil :: Set Type) ('Nil :: Set Type) Source # | |
Defined in Data.OneOfThem mergeFun_ :: OneOfThemFun 'Nil b -> OneOfThemFun 'Nil b -> OneOfThemFun 'Nil b |
mergeFun :: MergeableFun as as' (as :+: as') => OneOfThemFun as b -> OneOfThemFun as' b -> OneOfThemFun (as :+: as') b Source #