newNode Type t p =  do (Digraph ns es) <- getType
                       let ks = keys ns
                           newNode = Node (newId ks) (newId ks) p
                           newGraph = Digraph (M.insert (newId ks) newNode ns) es
                       putType newGraph
                       return $ newId ks -- thank you, lazyness
newNode Type t p =  do (Digraph ns es) <- getType
                       let ks = keys ns
                           newNode = Node (newId ks) (newId ks) p
                           newGraph = Digraph (M.insert (newId ks) newNode ns) es
                       putType newGraph
                       return $ newId ks -- thank you, lazyness
newNode Type t p =  do (Digraph ns es) <- getType
                       let ks = keys ns
                           newNode = Node (newId ks) (newId ks) p
                           newGraph = Digraph (M.insert (newId ks) newNode ns) es
                       putType newGraph
                       return $ newId ks -- thank you, lazyness