Initialize an empty Diagram. The idea is a box with no label. The box is abstract and will be given geometry using the Layout module
Use modifiers like setInPorts to configure further
Initialize an empty Diagram with a label of a chosen type
All diagrams you intend to combine needs to have the same label type
Wrap a diagram, exposing the free in and out ports
Make a relation with label a and a number of inPorts and outPorts
Connect diagrams in a chain
Put diagrams in paralell. No connections will be made. (We probably need to relabel ports here...)
Assign a label to a Diagram
setLabel (Just "node") <| diagram --Say which direction the children should lay out
Direction of composition of diagrams
D1 is horizontal (sequenced, chained) D2 is vertical (in paralell)
Include a list of diagrams inside another diagram. The included list will replace any previous innards.
Assign output ports to a Diagram
Assign input ports to a Diagram
Parts of a Diagram can be wrapped and given a label of its own (with setLabel)
Specify that a diagram exterior is significant
Map a function over a diagram innards You should avoid using this
Ports are a list of numbers identifying each port
Bump the port numbers of a diagram.
This is used to avoid duplicate ports when combining diagrams in paralell (relabel ports here...)
Represent an abstract wire-diagram.
Think of boxes connected with ports, that can be inside other boxes (which connect outside) (TODO illustration)