diff --git a/tests/positive/Markdown/markdown/Test.md b/tests/positive/Markdown/markdown/Test.md index d4147bfe6a..f0c03c84c4 100644 --- a/tests/positive/Markdown/markdown/Test.md +++ b/tests/positive/Markdown/markdown/Test.md @@ -5,25 +5,25 @@ What is important is seldom urgent. A Juvix Markdown file name ends with `.juvix.md`. This kind of file must contain a module declaration at the top, as shown below ---in the first code block. -
module Test;
+module Test;
Certain blocks can be hidden from the output by adding the `hide` attribute, as shown below.
-fib : Nat → Nat → Nat → Nat
| zero x1 _ := x1
| (suc n) x1 x2 := fib n x2 (x1 + x2);
fibonacci (n : Nat) : Nat := fib n 0 1;
+fib : Nat → Nat → Nat → Nat
| zero x1 _ := x1
| (suc n) x1 x2 := fib n x2 (x1 + x2);
fibonacci (n : Nat) : Nat := fib n 0 1;
The `extract-module-statements` attribute can be used to display only the statements contained in a module in the output.
-type T := t;
+type T := t;
You can pass a number to the `extract-module-statements` attribute to drop that number of statements from the start of the module.
-a : T := t;
+a : T := t;
Commands like `typecheck` and `compile` can be used with Juvix Markdown files.
-main : IO := readLn (printNatLn << fibonacci << stringToNat);
+main : IO := readLn (printNatLn << fibonacci << stringToNat);
Other code blocks are not touched, e.g:
@@ -67,8 +67,8 @@ We also use other markup for documentation such as:
Initial function arguments that match variables or wildcards in all clauses can
be moved to the left of the colon in the function definition. For example,
- module move-to-left;
import Stdlib.Data.Nat open;
add (n : Nat) : Nat -> Nat
| zero := n
| (suc m) := suc (add n m);
end;
+ module move-to-left;
import Stdlib.Data.Nat open;
add (n : Nat) : Nat -> Nat
| zero := n
| (suc m) := suc (add n m);
end;
is equivalent to
- module example-add;
import Stdlib.Data.Nat open;
add : Nat -> Nat -> Nat
| n zero := n
| n (suc m) := suc (add n m);
end;
+ module example-add;
import Stdlib.Data.Nat open;
add : Nat -> Nat -> Nat
| n zero := n
| n (suc m) := suc (add n m);
end;