Skip to content

Commit

Permalink
[ v0.1.2 ] Add DOTAble interface
Browse files Browse the repository at this point in the history
This allows for types to specify that they can be converted into a `DOT`
AST.
  • Loading branch information
CodingCellist committed Apr 5, 2022
1 parent 3bf4840 commit 935525e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dot-parse.ipkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package dot-parse
version = 0.1.1
version = 0.1.2
authors = "Thomas E. Hansen (CodingCellist)"
-- maintainers =
license = "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion sirdi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ { "name": "dot-parse"
, "version": "0.1.1"
, "version": "0.1.2"
, "license": "BSD-3-Clause"
, "authors": "Thomas E. Hansen (CodingCellist)"
, "modules": [ "Graphics.DOT.Lexer"
Expand Down
5 changes: 5 additions & 0 deletions src/Graphics/DOT/AST.idr
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ data DOT : Type where
CenterCPt : DOT
UnderCPt : DOT

||| The type `a` can be converted to a DOT/graphviz AST.
public export
interface DOTAble a where
||| Convert `a` to its `DOT` representation.
toDOT : a -> DOT

export
covering
Expand Down

0 comments on commit 935525e

Please sign in to comment.