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