fgl icon indicating copy to clipboard operation
fgl copied to clipboard

DynGraph contraint seems redundant in prettify

Open yaitskov opened this issue 2 years ago • 0 comments

-- | Pretty-print the graph.  Note that this loses a lot of
--   information, such as edge inverses, etc.
prettify :: (DynGraph gr, Show a, Show b) => gr a b -> String
prettify g = foldr (showsContext . context g) id (nodes g) ""
  where
    showsContext (_,n,l,s) sg = shows n . (':':) . shows l
                                . showString "->" . shows s
                                . ('\n':) . sg

yaitskov avatar Nov 19 '21 14:11 yaitskov