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

Stabilityexperimental
Maintainerconal@conal.net

Shady.Language.Graph

Contents

Description

Based on a typed variant of Andy Gill's data-reify. After several tries, I wasn't able to reuse data-reify or my typed variant of it. The problem was that I need my HasType class and Type type, but I couldn't parameterize data-reify by the class HasType.

Synopsis

Typed identifiers

type NodeId = IntSource

Node Identifiers

data Tid a Source

Typed variables

Constructors

Tid NodeId (Type a) 

Instances

Eq (Tid a) 
Show (Tid a) 

Graph nodes

data N whereSource

Constructors

VN :: V a -> N a 
ON :: Op a -> N a 
App :: (HasType a, HasType b) => Tid (a -> b) -> Tid a -> N b 

Instances

Show (N a) 

mapDeRef :: Applicative m => (forall a. HasType a => E a -> m NodeId) -> forall a. HasType a => E a -> m (N a)Source

Bindings

data Bind Source

Binding pair

Constructors

forall a . HasType a => Bind NodeId (N a) 

Instances

Graphs

data Graph a Source

Graph, described by bindings and a root variable

Constructors

Graph [Bind] (Tid a) 

Instances

Show (Graph a)