changeEdgeLabelE :: Label -> Edge -> GS Edge
changeEdgeLabelE l e = do let oeli = edgeLabelIndex e
                          neli <- createEdgeLabel l
                          ne <- saveEdge $ alterEdgeLabelIndex neli e
                          sn <- getStartNodeN e
                          en <- getEndNodeE e
                          sn1 <- removeOutEdge e oeli sn
                          en1 <- removeOutEdge e oeli en
                          _ <- addOutEdge ne en1 neli sn1
                          _ <- addInEdge ne sn1 neli en1
                          return ne
changeEdgeLabelE :: Label -> Edge -> GS Edge
changeEdgeLabelE l e = do let oeli = edgeLabelIndex e
                          neli <- createEdgeLabel l
                          ne <- saveEdge $ alterEdgeLabelIndex neli e
                          sn <- getStartNodeN e
                          en <- getEndNodeE e
                          sn1 <- removeOutEdge e oeli sn
                          en1 <- removeOutEdge e oeli en
                          _ <- addOutEdge ne en1 neli sn1
                          _ <- addInEdge ne sn1 neli en1
                          return ne
changeEdgeLabelE l e = do let oeli = edgeLabelIndex e
                          neli <- createEdgeLabel l
                          ne <- saveEdge $ alterEdgeLabelIndex neli e
                          sn <- getStartNodeN e
                          en <- getEndNodeE e
                          sn1 <- removeOutEdge e oeli sn
                          en1 <- removeOutEdge e oeli en
                          _ <- addOutEdge ne en1 neli sn1
                          _ <- addInEdge ne sn1 neli en1
                          return ne