-- | This function adds a node n2 (type tp) to the codomain of the typed graph morphism
--   It assumes tp already exist, and that n2 does not exist.
createNodeOnCodomain :: NodeId -> NodeId -> TypedGraphMorphism a b -> TypedGraphMorphism a b
createNodeOnCodomain n2 tp tgm =
  tgm { codomainGraph = GM.createNodeOnDomain n2 tp (codomainGraph tgm)
      , mapping = GM.createNodeOnCodomain n2 (mapping tgm)
      }
createNodeOnCodomain :: NodeId -> NodeId -> TypedGraphMorphism a b -> TypedGraphMorphism a b
createNodeOnCodomain n2 tp tgm =
  tgm { codomainGraph = GM.createNodeOnDomain n2 tp (codomainGraph tgm)
      , mapping = GM.createNodeOnCodomain n2 (mapping tgm)
      }
createNodeOnCodomain n2 tp tgm =
  tgm { codomainGraph = GM.createNodeOnDomain n2 tp (codomainGraph tgm)
      , mapping = GM.createNodeOnCodomain n2 (mapping tgm)
      }