This graph will render correctly:
let g = mkGraph [0,1] [(0,1,())]
but
let g = mkGraph [0,1] [(0,0,())]
wil fail with the scale by zero! Halp! error message.
The right thing is to do is probably add support for self-loops, but a quick fix would be to add a check to mkGraph and throw and runtime error on self loops, or filter them out.
This graph will render correctly:
let g = mkGraph [0,1] [(0,1,())]
butlet g = mkGraph [0,1] [(0,0,())]
wil fail with thescale by zero! Halp!
error message.The right thing is to do is probably add support for self-loops, but a quick fix would be to add a check to mkGraph and throw and runtime error on self loops, or filter them out.