71 lines
1.8 KiB
Typst
71 lines
1.8 KiB
Typst
#import "@preview/cetz:0.5.2": canvas, draw
|
|
#import "@preview/fletcher:0.5.8" as fletcher: diagram, node, edge
|
|
|
|
#let overview = diagram(
|
|
node-stroke: .6pt,
|
|
node-fill: white,
|
|
node((0, 0), [Midas Typer], name: <midas>),
|
|
node((1, 0), [Python Typer], name: <python>),
|
|
node((0.5, 1), [Types Registry], name: <reg>),
|
|
node((1, 2), [Generator], name: <gen>),
|
|
edge(<midas>, "d", <reg>, "<|-|>"),
|
|
edge(<python>, "d", <reg>, "<|-"),
|
|
edge((<python.south>, 50%, <python.south-east>), "d", <gen>, "-|>"),
|
|
edge(<reg>, "d", <gen>, "-|>"),
|
|
node(align(bottom + left)[*Type Checker*], enclose: (<midas>, <python>, <reg>, <gen>), fill: teal.lighten(80%)),
|
|
|
|
node((-1, 0), [Midas File], name: <midas-file>),
|
|
node((-1, 1), [Python File], name: <python-file>),
|
|
edge(
|
|
<midas-file.south>,
|
|
((), "|-", (-1, 0.4)),
|
|
((), "-|", (<midas.south-west>, 50%, <midas.south>)),
|
|
((), "|-", <midas.south>),
|
|
"=|>",
|
|
mark-scale: 150%
|
|
),
|
|
edge(
|
|
<python-file.north>,
|
|
((), "|-", (-1, 0.6)),
|
|
((), "-|", (<python.south-west>, 50%, <python.south>)),
|
|
((), "|-", <python.south>),
|
|
"=|>",
|
|
mark-scale: 150%
|
|
),
|
|
/*node((-1, .5), [
|
|
types.midas\
|
|
source.py
|
|
], name: <files>),*/
|
|
/*edge(
|
|
(<files.north-east>, 80%, <files.east>),
|
|
((), "-|", (<midas.south-west>, 50%, <midas.south>)),
|
|
((), "|-", <midas.south>),
|
|
"=|>",
|
|
mark-scale: 150%,
|
|
),
|
|
edge(
|
|
(<files.south-east>, 80%, <files.east>),
|
|
((), "-|", (<python.south-west>, 50%, <python.south>)),
|
|
((), "|-", <python.south>),
|
|
"=|>",
|
|
mark-scale: 150%,
|
|
)*/
|
|
|
|
node((3, 1.5), [Stubs], name: <stubs>, width: 5.5em),
|
|
node((3, 2), [Generated Python], name: <output>, width: 5.5em),
|
|
edge(
|
|
<gen>,
|
|
<output>,
|
|
"=|>",
|
|
mark-scale: 150%
|
|
),
|
|
edge(
|
|
<gen>,
|
|
"r",
|
|
((), "|-", <stubs>),
|
|
<stubs>,
|
|
"=|>",
|
|
mark-scale: 150%
|
|
)
|
|
)
|