1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-14 08:27:03 +03:00
juvix/app/Commands
Jonathan Cubides bd16d3ef2a
Add support for Literate Juvix Markdown (#2448)
This PR adds an initial support for Literate Juvix Markdown files, files
with the extension `.juvix.md`.

Here is a small example of such a file: `Test.juvix.md`.

<pre>
# This is a heading
Lorem ...

```juvix
module Test;

type A := a;

fun : A -> A 
 | _ := a;
```
Other text
</pre>


This initial support enables users to execute common commands such as
typechecking, compilation, and HTML generation. Additionally, a new
command called `markdown` has been introduced. This command replaces
code blocks marked with the juvix attribute with their respective HTML
output, much like the output we obtain when running `juvix html`. In
this version, comments are ignored in the output, including judoc
blocks.

- We intend to use this new feature in combination with this Python
plugin (https://github.com/anoma/juvix-mkdocs) to enhance our
documentation site.



https://github.com/anoma/juvix/assets/1428088/a0c17f36-3d76-42cc-a571-91f885866874


## Future work

Open as issues once this PR is merged, we can work on the following:

- Support imports of Juvix Markdown modules (update the path resolver to
support imports of Literate Markdown files)
- Support (Judoc) comments in md Juvix blocks
- Support Markdown in Judoc blocks
- Update Text editor support, vscode extension and emacs mode (the
highlighting info is a few characters off in the current state)



- Closes #1839 
- Closes #1719
2023-11-10 13:55:36 +01:00
..
Clean Use Package.juvix in the global project (#2499) 2023-11-06 11:49:43 +00:00
Compile Add support for Literate Juvix Markdown (#2448) 2023-11-10 13:55:36 +01:00
Dependencies Add juvix dependencies update command (#2419) 2023-10-03 18:09:13 +02:00
Dev Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Doctor Global offline flag (#2335) 2023-09-05 17:11:17 +02:00
Eval Add support for Literate Juvix Markdown (#2448) 2023-11-10 13:55:36 +01:00
Extra Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Format Add FileExt type (#2467) 2023-10-25 12:02:12 +02:00
Html Add support for Literate Juvix Markdown (#2448) 2023-11-10 13:55:36 +01:00
Init Add -n/--non-interactive option to juvix init (#2500) 2023-11-06 13:56:20 +00:00
Markdown Add support for Literate Juvix Markdown (#2448) 2023-11-10 13:55:36 +01:00
Repl Rename Roots type to Root (#2480) 2023-10-30 14:05:52 +01:00
Typecheck Add support for Literate Juvix Markdown (#2448) 2023-11-10 13:55:36 +01:00
Base.hs Refactor CLI (#1527) 2022-09-14 16:16:15 +02:00
Clean.hs Use Package.juvix in the global project (#2499) 2023-11-06 11:49:43 +00:00
Compile.hs Add main field to juvix.yaml (#2120) 2023-05-24 15:42:20 +02:00
Dependencies.hs Add juvix dependencies update command (#2419) 2023-10-03 18:09:13 +02:00
Dev.hs Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Doctor.hs Use a versioned documentation link in the doctor output (#2475) 2023-10-26 11:51:48 +01:00
Eval.hs Fix 'function not found' error in juvix eval (#2178) 2023-06-06 13:26:43 +02:00
Format.hs Fix remove unexpected whitespaces introduced by formatting (#2489) 2023-11-03 12:51:45 +01:00
Html.hs Add new flags to the Html backend (#2447) 2023-10-23 16:22:04 +02:00
Init.hs Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Markdown.hs Add support for Literate Juvix Markdown (#2448) 2023-11-10 13:55:36 +01:00
Repl.hs Migrate all Juvix projects from juvix.yaml to Package.juvix in the repository (#2503) 2023-11-07 18:11:02 +00:00
Typecheck.hs Update ci to use ormolu 0.5.3.0 and reformat project (#2313) 2023-08-25 17:37:23 +01:00