Skip to content

Instantly share code, notes, and snippets.

@s9gf4ult
Created October 1, 2023 13:20
Show Gist options
  • Save s9gf4ult/a0fedde32f09019b500b8bbb898b9193 to your computer and use it in GitHub Desktop.
Save s9gf4ult/a0fedde32f09019b500b8bbb898b9193 to your computer and use it in GitHub Desktop.
strict digraph {
graph [layout=dot; overlap=false; rankdir=LR; nodesep=0.5];
subgraph types {
node [shape=oval];
Integer -> Rational [label="(%1)"];
}
subgraph classes {
node [shape=square];
edge [arrowhead=diamond; style=dashed];
Num;
Real;
Real -> Num;
Integral -> Real;
Fractional -> Num;
Floating -> Fractional;
RealFrac -> {Real; Fractional};
RealFloat -> {RealFrac; Floating};
}
subgraph methods {
edge [color=red];
Integer -> Num [label=fromInteger];
Real -> Rational [label=toRational];
Integral -> Integer [label=toInteger];
Rational -> Fractional [label=fromRational];
RealFrac -> Integral [label=round];
}
subgraph cluster_legend {
graph [label=legend];
A -> B [label=function];
X -> Y [color=red; label="typeclass method"];
{ node [shape=square];
C1 -> C2 [arrowhead=diamond; style=dashed; label=inheritance];
}
}
}
@s9gf4ult
Copy link
Author

s9gf4ult commented Oct 1, 2023

prelude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment