shady-gen-0.5.1: Functional GPU programming - DSEL & compiler

Stabilityexperimental
Maintainerconal@conal.net

Shady.Language.Glom

Description

Typed conglomerate of values

Synopsis

Documentation

class FunctorU q whereSource

Map a polymorphic function over a conglomerate (preserving structure). The required laws are the same as with Functor.

Methods

fmapU :: (forall a. f a -> g a) -> forall a. q f a -> q g aSource

Instances

class FunctorU m => MonadU m whereSource

Methods

returnU :: f a -> m f aSource

extendU :: (forall a. f a -> m g a) -> forall a. m f a -> m g aSource

Instances

data Glom f a whereSource

A typed conglomerate of values

Constructors

BaseG :: f a -> Glom f a 
UnitG :: Glom f () 
:* :: (HasType a, HasType b, Show a, Show b) => Glom f a -> Glom f b -> Glom f (a, b) 

Instances

MonadU Glom 
FunctorU Glom 
HasExprU f => HasExprU (Glom f) 
UnitF (Glom f) 
PairF (Glom f) 
ToE (Pat a) 
(HasExpr a, HasExprU f) => Show (Glom f a) 
(HasExpr a, HasExprU f) => Pretty (Glom f a) 
(HasExpr a, HasExprU f) => PrettyPrec (Glom f a) 
(HasExpr a, HasExprU f) => HasExpr (Glom f a) 

foldG :: (c -> c -> c) -> c -> (forall b. f b -> c) -> Glom f a -> cSource

Fold over a Glom, given handlers for '(:*)', UnitG, and BaseG, respectively.

mapAG :: Applicative m => (forall a. f a -> m (g a)) -> forall a. Glom f a -> m (Glom g a)Source

Applicative/monadic map over a Glom.