Created
December 8, 2012 07:07
-
-
Save awreece/4239062 to your computer and use it in GitHub Desktop.
ocamlgraph dot patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn diff | |
Index: src/dot.ml | |
=================================================================== | |
--- src/dot.ml (revision 453) | |
+++ src/dot.ml (working copy) | |
@@ -147,15 +147,15 @@ | |
let al = Attr.addl !def_edge_attr al in | |
let el = L.edge [Attr.list al] in | |
let g,vn = node g id [] in | |
- List.fold_left | |
- (fun g m -> match m with | |
- | NodeId idm -> | |
- let g,vm = node g idm [] in | |
- let e = B.G.E.create vn el vm in | |
- B.add_edge_e g e | |
- | NodeSub _ -> | |
- g) | |
- g nl | |
+ fst (List.fold_left | |
+ (fun (g,pvn) m -> match m with | |
+ | NodeId idm -> | |
+ let g,vm = node g idm [] in | |
+ let e = B.G.E.create pvn el vm in | |
+ ((B.add_edge_e g e),vm) | |
+ | NodeSub _ -> | |
+ (g,pvn)) | |
+ (g,vn) nl) | |
| Attr_edge al -> | |
def_edge_attr := Attr.addl !def_edge_attr al; g | |
| Subgraph (SubgraphDef (_, stmts)) -> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment