mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Define a Vertex datatype.
This commit is contained in:
parent
3e991e8309
commit
9186742ba1
@ -25,6 +25,12 @@ import Prologue hiding (empty, packageName)
|
||||
newtype ImportGraph = ImportGraph { unImportGraph :: G.Graph Name }
|
||||
deriving (Eq, Graph, Show)
|
||||
|
||||
data Vertex
|
||||
= Package PackageName
|
||||
| Module ModuleName
|
||||
| Variable Name
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
-- | Render a 'ImportGraph' to a 'ByteString' in DOT notation.
|
||||
renderImportGraph :: ImportGraph -> ByteString
|
||||
renderImportGraph = export (defaultStyle friendlyName) . unImportGraph
|
||||
|
Loading…
Reference in New Issue
Block a user