Compare commits

..

36 commits

Author SHA1 Message Date
f0e206a8eb
docs: fix typo 2024-01-18 20:20:34 +01:00
bcd96a68fe
feat(ir): replace Rpl with GraphIr
Semi-broken as atm the CLI just does nothing except printing the parsed
IR, instead of actually executing it.
2024-01-18 20:20:34 +01:00
9201b03d9e
style: drop Instruction suffix from instructions 2024-01-18 20:20:34 +01:00
f17e1b8051
docs(template): make outline rendering configurable 2024-01-18 20:20:33 +01:00
556a2ff716
docs: retab from tabs to 2 spaces 2024-01-18 20:20:33 +01:00
ee149c212c
test: prettify TEST_DATA over multiple lines 2024-01-18 20:20:33 +01:00
3a013f4df1
test: fix running tests 2024-01-18 20:20:33 +01:00
4807b8b7a7
style: propagate clippy lints throughout workspace 2024-01-18 20:20:33 +01:00
11cef9e5f6
docs: microoptimize graph a bit 2024-01-18 20:20:33 +01:00
3d7cd8b37f
fix: take care of clippy warnings and add test image 2024-01-18 20:20:33 +01:00
81f44f76d8
repo: make build possible 2024-01-18 20:20:33 +01:00
314582e441
docs(design): split into function and instruction 2024-01-18 20:20:32 +01:00
28f42df36e
repo: add helpful comment to justfile 2024-01-18 20:20:32 +01:00
3dc216dd4b
repo: expand on CONTRIBUTING.md about PRs 2024-01-18 20:20:32 +01:00
e3d4c88921
repo: switch to nu for just 2024-01-18 20:20:32 +01:00
70402c25ba
docs: use weak pagebreaks for automatic pagebreaks 2024-01-18 20:20:32 +01:00
e5df894daa
docs: place strategic pagebreaks automatically 2024-01-18 20:20:32 +01:00
7a93ef35fa
docs(design): explain individual lines of input ex 2024-01-18 20:20:32 +01:00
f7bb858fa3
docs: justify main text 2024-01-18 20:20:32 +01:00
76096a07fc
docs(design): rename command -> instruction 2024-01-18 20:20:31 +01:00
b5441a3e43
docs: only highlight standalone terms 2024-01-18 20:20:31 +01:00
075b475429
docs: move config from design to template 2024-01-18 20:20:31 +01:00
4c0b25efcf
docs(design): add graph ir repr and explain a bit 2024-01-18 20:20:31 +01:00
e41388fbb7
docs(design): get rid of ast 2024-01-18 20:20:31 +01:00
a93c16da5c
docs(design): add larger source example 2024-01-18 20:20:31 +01:00
92fe4c51a3
docs(contributing): add penpot 2024-01-18 20:20:31 +01:00
1faa6f6d29
docs(design): actually write some content 2024-01-18 20:20:31 +01:00
43e6dfd240
meta: set up some signs 2024-01-18 20:20:30 +01:00
e2e4c2c29f
docs: rework template and add stages framework 2024-01-18 20:20:30 +01:00
8f790af8a1
repo: make typst compilation more generic 2024-01-18 20:20:30 +01:00
d779992eb1
docs: add readme 2024-01-18 20:20:30 +01:00
8df3090ae1
actually write things 2024-01-18 20:20:30 +01:00
70256a7bfc Merge pull request 'write initial type signature notation proposal' (#5) from schrottkatze/iowo:type-notation into main
Reviewed-on: #5
Reviewed-by: multisn8 <forgejo-schrottkatze@multisamplednight.com>
2024-01-11 14:55:56 +00:00
b91e697449 add example for multiple generics 2024-01-11 10:55:25 +01:00
e1dc5ce132 doc: change code from inline to blocks 2024-01-11 10:48:43 +01:00
22a655fd24 write initial type signature notation proposal 2024-01-10 12:45:41 +01:00

View file

@ -0,0 +1,38 @@
#import "../template.typ": conf
#show: conf
= Type/signature notation
Operator signature that takes two unnamed arbitrary numbers of the same type and returns another:
```iowo
Op<T: Num> [ T T ] -> T
```
Operator signature that takes any color and any number type, and returns a color again:
```iowo
Op<C: Color, M: Num> [ C M ] -> C
```
Operator that takes a 32 bit signed integer and returns another:
```iowo
Op i32 -> i32
```
Operator that does the same with a generic arbitrary number type:
```iowo
Op<T: Num> T -> T
```
One dimensional list of 32 bit signed integers:
```iowo
[i32]
```
Due to inference, you'll also be able to use that in some mathematical operations with integers:
`[i32] + i32` is a valid operation, for example (of course, you can't add types.) But that wouldn't add the second one to the list, but rather add the single i32 to all values in the left hand side list). That would also work with more dimensional arrays and dynamic streams like videos.