newEdge :: Node a -> Node a -> StGNG a Edge
newEdge n1 n2 = do
    eid <- newEdgeId
    let nid1 = n1^.nodeId
    let nid2 = n2^.nodeId
    let edge = Edge eid nid1 nid2 0
    State.modify (&edges %~ Map.insert eid edge)
    modifyNode (&edgeIds %~ (eid:)) nid1
    modifyNode (&edgeIds %~ (eid:)) nid2
    return edge
newEdge :: Node a -> Node a -> StGNG a Edge
newEdge n1 n2 = do
    eid <- newEdgeId
    let nid1 = n1^.nodeId
    let nid2 = n2^.nodeId
    let edge = Edge eid nid1 nid2 0
    State.modify (&edges %~ Map.insert eid edge)
    modifyNode (&edgeIds %~ (eid:)) nid1
    modifyNode (&edgeIds %~ (eid:)) nid2
    return edge
newEdge n1 n2 = do
    eid <- newEdgeId
    let nid1 = n1^.nodeId
    let nid2 = n2^.nodeId
    let edge = Edge eid nid1 nid2 0
    State.modify (&edges %~ Map.insert eid edge)
    modifyNode (&edgeIds %~ (eid:)) nid1
    modifyNode (&edgeIds %~ (eid:)) nid2
    return edge