newEdge :: Monad m => Target -> TypeId -> (Int, Int) -> b -> InstanceBuilder a b m Int
newEdge Inst t c p = do (Digraph ns es) <- getGraph
                        let ks = keys es
                            newNode = Edge (newId ks) c t p
                            newGraph = Digraph ns (M.insert (newId ks) newNode es)
                        putGraph newGraph
                        return $ newId ks -- thank you, lazyness
newEdge :: Monad m => Target -> TypeId -> (Int, Int) -> b -> InstanceBuilder a b m Int
newEdge Inst t c p = do (Digraph ns es) <- getGraph
                        let ks = keys es
                            newNode = Edge (newId ks) c t p
                            newGraph = Digraph ns (M.insert (newId ks) newNode es)
                        putGraph newGraph
                        return $ newId ks -- thank you, lazyness
newEdge Inst t c p = do (Digraph ns es) <- getGraph
                        let ks = keys es
                            newNode = Edge (newId ks) c t p
                            newGraph = Digraph ns (M.insert (newId ks) newNode es)
                        putGraph newGraph
                        return $ newId ks -- thank you, lazyness