-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Djot is a markup format that is derived from CommonMark, it's code block syntax is identical to CommonMark's, so we can support it as a CommonMark style literate formate by just adding the file extension.
- Loading branch information
Showing
8 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
```idris | ||
data Vect : Nat -> Type -> Type where | ||
Nil : Vect Z a | ||
(::) : a -> Vect k a -> Vect (S k) a | ||
``` | ||
|
||
<!-- idris | ||
%name Vect xs, ys, zs | ||
--> | ||
|
||
```idris | ||
dupAll : Vect n a -> Vect n (a, a) | ||
dupAll xs = zipHere xs xs | ||
where | ||
zipHere : forall n . Vect n a -> Vect n b -> Vect n (a, b) | ||
``` | ||
|
||
|
||
<!-- idris | ||
|
||
data Foobar = MkFoo | ||
|
||
--> | ||
|
||
|
||
```idris | ||
showFooBar : Foobar -> String | ||
showFooBar MkFoo = "MkFoo" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1/1: Building IEdit (IEdit.dj) | ||
Main> zipHere [] [] = [] | ||
zipHere (x :: xs) (y :: ys) = (x, y) :: zipHere xs ys | ||
Main> Bye for now! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
:gd 15 zipHere | ||
:q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
. ../../../testutils.sh | ||
|
||
idris2 IEdit.dj < input |