grLangNamingContext :: Dot.NamingContext Metadata Metadata ann
grLangNamingContext = Dot.Ctx
  { Dot.getNodeTypeName = \(n, _) -> pretty $ nodeTypeName n
  , Dot.getEdgeTypeName = \((s,_), e, (t,_)) -> pretty $ showEdgeType (edgeName e) s t
  , Dot.getNodeName = \_ (node, _, _) -> pretty (nodeName node)
  , Dot.getNodeLabel = \_ (node, ntype, _) ->
      Just $ pretty (nodeName node) <> ":" <> pretty (nodeTypeName ntype)
  , Dot.getEdgeLabel = \_ (_, edge, etype, _) ->
      Just $ case edgeExactName edge of
        Nothing -> pretty $ edgeName etype
        Just name -> pretty name <> ":" <> pretty (edgeName etype)
  }
grLangNamingContext :: Dot.NamingContext Metadata Metadata ann
grLangNamingContext = Dot.Ctx
  { Dot.getNodeTypeName = \(n, _) -> pretty $ nodeTypeName n
  , Dot.getEdgeTypeName = \((s,_), e, (t,_)) -> pretty $ showEdgeType (edgeName e) s t
  , Dot.getNodeName = \_ (node, _, _) -> pretty (nodeName node)
  , Dot.getNodeLabel = \_ (node, ntype, _) ->
      Just $ pretty (nodeName node) <> ":" <> pretty (nodeTypeName ntype)
  , Dot.getEdgeLabel = \_ (_, edge, etype, _) ->
      Just $ case edgeExactName edge of
        Nothing -> pretty $ edgeName etype
        Just name -> pretty name <> ":" <> pretty (edgeName etype)
  }
grLangNamingContext = Dot.Ctx
  { Dot.getNodeTypeName = \(n, _) -> pretty $ nodeTypeName n
  , Dot.getEdgeTypeName = \((s,_), e, (t,_)) -> pretty $ showEdgeType (edgeName e) s t
  , Dot.getNodeName = \_ (node, _, _) -> pretty (nodeName node)
  , Dot.getNodeLabel = \_ (node, ntype, _) ->
      Just $ pretty (nodeName node) <> ":" <> pretty (nodeTypeName ntype)
  , Dot.getEdgeLabel = \_ (_, edge, etype, _) ->
      Just $ case edgeExactName edge of
        Nothing -> pretty $ edgeName etype
        Just name -> pretty name <> ":" <> pretty (edgeName etype)
  }