TV-0.5.0: Tangible Values -- composable interfaces

PortabilityGADTs
Stabilityexperimental
Maintainerconal@conal.net
Safe HaskellNone

Interface.TV.Input

Contents

Description

Inputs -- means of obtaining values

Synopsis

Input data type

data Input whereSource

An Input describes a way to obtain a functional value from a user. Used in Output for making function visualizations. The constructors: primitive, pairing, and title.

Constructors

IPrim :: src a -> Input src a 
IPair :: Input src a -> Input src b -> Input src (a, b) 
ITitle :: String -> Input src a -> Input src a 

Instances

Functor src => Functor (Input src) 
Pair (Input src) 
Title_f (Input src) 
Lambda (Input src) (Output src snk) 
Show (Input src a) 

input :: (Pair src, Title_f src) => Input src t -> src tSource

Input functions

Builders

iPrim :: src a -> Input src aSource

Input primitive

iPair :: Input src a -> Input src b -> Input src (a, b)Source

Input a pair

iTitle :: String -> Input src a -> Input src aSource

Title (label) an input

Canonicalizers

asIPair :: Input src (a, b) -> (Input src a, Input src b)Source

Dissect a pair-valued input into two inputs. Loses outer iTitles. Must be a (possibly titled) pair-style input.