-- show node number of input
cNodeNumber :: String -> CmdlState -> IO CmdlState
cNodeNumber input state =
  case i_state $ intState state of
    Nothing -> return state
    Just dgState ->
      let (errors, nodes) = getInputDGNodes input dgState
          ls = map (\ (i, n) -> getDGNodeName n ++ " is node number " ++
                    show i) nodes
       in return $ genMessage errors (intercalate "\n" ls) state

-- print the name of all edges
cNodeNumber :: String -> CmdlState -> IO CmdlState
cNodeNumber input state =
  case i_state $ intState state of
    Nothing -> return state
    Just dgState ->
      let (errors, nodes) = getInputDGNodes input dgState
          ls = map (\ (i, n) -> getDGNodeName n ++ " is node number " ++
                    show i) nodes
       in return $ genMessage errors (intercalate "\n" ls) state

-- print the name of all edges
cNodeNumber input state =
  case i_state $ intState state of
    Nothing -> return state
    Just dgState ->
      let (errors, nodes) = getInputDGNodes input dgState
          ls = map (\ (i, n) -> getDGNodeName n ++ " is node number " ++
                    show i) nodes
       in return $ genMessage errors (intercalate "\n" ls) state

-- print the name of all edges