jcberentsen/elm-wiring-diagrams/3.0.0

NOTE: the latest version is 5.4.7

WiringDiagram.Examples

Some example diagrams

sampleDiagrams : List Diagram

A list of some diagrams

sampleDiagrams : List Diagram
sampleDiagrams =
    [ inSequence [ a, b, c ]
    , inSequence [ wrap a, wrap b ]
    , inSequence [ wrap a, wrap (inParallel [ b, c |> offsetPorts 1 ]) ]
    , wrap_a
    , inSequence
        [ wrap (source "a" 2)
        , sink "b" 2
        ]
    , wrap_axb_c
    , inSequence [ a, b ]
    , inSequence [ source "a3" 3, sink "b2" 2 ]
    ]
a : Diagram

A simple source labeled 'a' It has one output port.

b : Diagram

A simple relation labeled 'b' It has one input and one output port

c : Diagram

A simple sink labeled 'c' It has one input port

a2 : Diagram

A simple source labeled 'a2' It has two output ports

b2 : Diagram

A simple relation labeled 'b2' It has two input and output ports

c2 : Diagram

A simple sink labeled 'c2' It has two input ports

twoLanes : Diagram

Two sequenced diagrams in parallel

inParallel
    [ inSequence [ a, c ]
    , inSequence [ source "d" 1, sink "e" 1 ]
    ]