-- print the name of all nodes
cNodes :: CmdlState -> IO CmdlState
cNodes state
 = case i_state $ intState state of
    -- no library loaded, so nothing to print
    Nothing -> return state
    Just dgState ->
     do
     -- compute the list of node names
     let ls = nodeNames $ getAllNodes dgState
     -- print a sorted version of it
     return $ genMessage [] (intercalate "\n" $ sort ls) state
cNodes :: CmdlState -> IO CmdlState
cNodes state
 = case i_state $ intState state of
    -- no library loaded, so nothing to print
    Nothing -> return state
    Just dgState ->
     do
     -- compute the list of node names
     let ls = nodeNames $ getAllNodes dgState
     -- print a sorted version of it
     return $ genMessage [] (intercalate "\n" $ sort ls) state
cNodes state
 = case i_state $ intState state of
    -- no library loaded, so nothing to print
    Nothing -> return state
    Just dgState ->
     do
     -- compute the list of node names
     let ls = nodeNames $ getAllNodes dgState
     -- print a sorted version of it
     return $ genMessage [] (intercalate "\n" $ sort ls) state