newEdge Rule t c p = do (Morphism ns es) <- getCurrentRule
                        let kext f = map edgeID $ catMaybes $ map f es
                            ks =  kext fst `union` kext snd
                            newEdge = (Just $ Edge (newId ks) c t p)
                            newRule = (newEdge, newEdge)
                        setCurrentRule $ Morphism ns (newRule:es)
                        return $ newId ks
newEdge Rule t c p = do (Morphism ns es) <- getCurrentRule
                        let kext f = map edgeID $ catMaybes $ map f es
                            ks =  kext fst `union` kext snd
                            newEdge = (Just $ Edge (newId ks) c t p)
                            newRule = (newEdge, newEdge)
                        setCurrentRule $ Morphism ns (newRule:es)
                        return $ newId ks
newEdge Rule t c p = do (Morphism ns es) <- getCurrentRule
                        let kext f = map edgeID $ catMaybes $ map f es
                            ks =  kext fst `union` kext snd
                            newEdge = (Just $ Edge (newId ks) c t p)
                            newRule = (newEdge, newEdge)
                        setCurrentRule $ Morphism ns (newRule:es)
                        return $ newId ks