| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Pangraph.GraphML.Parser
Description
Provides two functions for constructing a Pangraph from a GraphML file.
Synopsis
- parse :: ByteString -> Maybe Pangraph
- unsafeParse :: ByteString -> Pangraph
Documentation
parse :: ByteString -> Maybe Pangraph Source #
Throws on on failed XML parsing. Otherwise returns 'Right Pangraph' if the graph is well formed, listing 'Left [MalformedEdge]' otherwise.
unsafeParse :: ByteString -> Pangraph Source #
Like parse except it throws an error on Nothing, which is when parsing fails OR the graph is malformed.