nettle-frp-0.1: FRP for controlling networks of OpenFlow switches.

Nettle.FRPControl.AFRPUtils

Contents

Description

This module provides some utilities for writing drivers of signal functions.

Synopsis

Type-level lists

data Nil Source

Empty list.

data x ::: xs Source

Cons list

Value-level representation of type-level lists

data Rep a whereSource

Infix operator; synonymous with TCons.

Value level representation of type level lists.

Constructors

RNil :: Rep Nil 
RCons :: Rep b -> Rep (a ::: b) 

Event-source vector

type family SFInput t Source

Input types for each heterogeneous type list.

List of sensor channels

type family SensorChans t Source

Vector of Sensor channels of the right types

Output vector

type family SFOutput t Source

Output type for each heterogeneous list

List of actuator actions

type family Actuators t Source

Driver

sfDriverSource

Arguments

:: Rep s

Representation of the shape of the SensorChans argument

-> SensorChans s

Sensor channels

-> Rep t

Representation of the shape of the actuator argument

-> Actuators t

Actuators

-> SF (SFInput s) (SFOutput t)

Signal function to drive

-> IO () 

Drives signal functions with the given collection of sensor channels and actuator actions. It multiplexes the sensors into a single channel of events.