From e1dc5ce13284507821d89272d3eb19fe19faba11 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 11 Jan 2024 10:48:43 +0100 Subject: [PATCH] doc: change code from inline to blocks --- docs/design/type-notation.typ | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/design/type-notation.typ b/docs/design/type-notation.typ index 58977b9..18e7d95 100644 --- a/docs/design/type-notation.typ +++ b/docs/design/type-notation.typ @@ -1,21 +1,31 @@ #import "../template.typ": conf -#show: doc => conf( - doc -) +#show: conf = Type/signature notation Operator signature that takes two unnamed arbitrary numbers of the same type and returns another: -`Op [ T T ] -> T` + +```iowo +Op [ T T ] -> T +``` Operator that takes a 32 bit signed integer and returns another: -`Op i32 -> i32` + +```iowo +Op i32 -> i32 +``` Operator that does the same with a generic arbitrary number type: -`Op T -> T` + +```iowo +Op T -> T +``` One dimensional list of 32 bit signed integers: -`[i32]` + +```iowo +[i32] +``` Due to inference, you'll also be able to use that in some mathematical operations with integers: