1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-11 08:25:46 +03:00
Commit Graph

38 Commits

Author SHA1 Message Date
Paul Cadman
24af7702d3
Fix docs webapp examples CI build (#1505)
The default compile target is now native, so we need to pass `-t wasm`
to the webapp examples build.
2022-09-05 13:38:04 +01:00
Jonathan Cubides
54a204a19b Update Changelog v0.2.3 🎉 2022-08-15 12:24:42 +02:00
Paul Cadman
1ba72b4d9b
Add Towers of Hanoi and Pascal triangle examples (#1446)
* Add new examples of Juvix programs

* Build documentation for Hanoi and Pascal examples
2022-08-10 12:02:14 +01:00
Jonathan Cubides
9543b06cf5 Add HelloWorld example and minor other fixes README 2022-08-08 12:13:27 +02:00
Paul Cadman
512211da8e
Setup Clang before building docs in CI (#1433)
* Setup Clang before building docs in CI

* Debug CI

* Debug CI

* Debug CI

* Debug CI

* Fix JS name

* Fix copying of webapp resources to output folder
2022-08-04 09:19:03 +01:00
Paul Cadman
98776997db
Add a Web version of TicTacToe (#1427)
* Add a Web version of TicTacToe

The web version demonstrates injecting host functions into the WASM
import table and call exported Juvix functions from JS.

The web version and the CLI version of the TicTacToe game use the same
game logic backend Juvix module.

* Build and publish web apps in documentation

* Add a link to the TicTacToe web app in example documentation

* Update Makefile to match the new format
2022-08-03 16:14:38 +02:00
Jonathan Cubides
6a4b0e36df
Major revisions to Makefile (#1431)
* Major revisions to Makefile

* Remove from the CI the use of make install-shelltest

* Remove comment
2022-08-03 14:44:48 +02:00
Jonathan Cubides
6be62a0d72 v0.2.2 2022-07-25 18:54:48 +02:00
Jonathan Cubides
30ae6c76c4 Update some docs (#1391)
* Documment a few language features

* Add an example for foreign example

* Fix pre-commit warnings

* remove what-is-org

* Ignore README.org in docs folder

* Add fixes for revisions
2022-07-19 21:13:35 +02:00
Jonathan Cubides
34c6dd478d
Fix documentation generation (#1387)
* testing

* Add --print-metadata flag

* Minor fix
2022-07-15 17:20:31 +02:00
Jonathan Cubides
f30ddf7820
html-examples (#1381)
* html-examples

* Fix Makefile

* Fix yaml file

* [ci] add main to the path

* install juvix

* Add Collatz and fix cname in the CI

* Add Collatz file name

* Add deleted file and and uncomment cond in the CI
2022-07-15 13:52:16 +02:00
Jonathan Cubides
3b3ea45da9
Rename MiniJuvix to Juvix (#259)
* Renaming MiniJuvix to Juvix

* Make Ormolu happy

* Make Hlint happy

* Remove redundant imports

* Fix shell tests and add target ci to our Makefile

* Make pre-commit happy
2022-07-08 13:59:45 +02:00
Paul Cadman
e557f24b1d
Restore mascot images to the minijuvix book (#250) 2022-07-06 14:23:13 +02:00
Jonathan Cubides
3b0cde27bb
Add CLI improvements and shell testing (#131)
* Remove input file fields from command opts

* [cli] Make version and help commands

* Fix on reviews

* Fixes for dealing with global options inside subcmds

* Fix minijuvix emacs mode and add some instance to GlobalOpts

* Remove unrelated code

* Propagate globals opts in each cmd parser

* Add initial shell tests

* Add test-shell to makefile and CI

* Fix CI: adding .local/bin to PATH

* Fixing CI

* Installing shelltest just before running it

* Install app for shell testing

* Hide global flags after cmd. Fix shell tests accordingly.

* Fixing CI

* Shell test only run on ubuntu for now
2022-06-09 16:36:07 +02:00
Jonathan Cubides
a4eb2124b2
Generic Errors and refactoring (#123)
* w.i.p adoption of generic error type

* harmonize

* Remove the use of Error effect for internal bugs

* add location information to expression atom list

* Add GenericError instance for PatternAtoms

* Remove Maybe GenericError occurrences

* [ci] fix draft job's condition

* minor changes

* [stack] macos support ghc-opts

* Fix reviewer's comments

* remove accidentally commited file

* refactor to avoid duplication

* fix

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2022-05-26 17:52:08 +02:00
Jonathan Cubides
7e309eccdb
Add initial documentation (#119) (#120)
* Add initial docs generation website (#119)

* Add docs generation

* [makefile] add serve-docs target

* Fixed rebase conflicts

* Update pre-commit rev

* Added changelog
2022-05-23 16:20:02 +02:00
Jonathan Cubides
7e20e5083b
Add initial docs generation website (#119)
* Add docs generation

* [makefile] add serve-docs target
2022-05-20 16:16:16 +02:00
Jonathan Cubides
3004d1a404
Stricter stack builds and pedantic mode for CI (#78)
* Make CI even more pedantic

* remove aeson dependency

Co-authored-by: Paul Cadman <pcadman@gmail.com>
Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2022-05-05 15:21:04 +01:00
Paul Cadman
60236e7b58
Add C code generation backend (#68)
* [cbackend] Adds an AST for C

This should cover enough C to implement the microjuvix backend.

* [cbackend] Add C serializer using language-c library

We may decide to write our own serializer for the C AST but this
demonstrates that the C AST is sufficient at least.

* [cbackend] Declarations will always be typed

* [cbackend] Add CPP support to AST

* [cbackend] Rename some names for clarity

* [cbackend] Add translation of InductiveDef to C

* [cbackend] Add CLI for C backend

* [cbackend] Add stdbool.h to file header

* [cbackend] Allow Cpp and Verbatim code inline

* [cbackend] Add a newline after printing C

* [cbackend] Support foreign blocks

* [cbackend] Add support for axioms

* [cbackend] Remove code examples

* [cbackend] wip FunctionDef including Expressions

* [parser] Support esacping '}' inside a foreign block

* [cbackend] Add support for patterns in functions

* [cbackend] Add foreign C support to HelloWorld.mjuvix

* hlint fixes

* More hlint fixes not picked up by pre-commit

* [cbackend] Remove CompileStatement from MonoJuvix

* [cbackend] Add support for compile blocks

* [cbackend] Move compileInfo extraction to MonoJuvixResult

* [minihaskell] Fix compile block support

* [chore] Remove ununsed isBackendSupported function

* [chore] Remove unused imports

* [cbackend] Use a Reader for pattern bindings

* [cbackend] Fix compiler warnings

* [cbackend] Add support for nested patterns

* [cbackend] Use functions to instantiate argument names

* [cbackend] Add non-exhaustive pattern error message

* [cbackend] Adds test for c to WASM compile and execution

* [cbackend] Add links to test dependencies in quickstart

* [cbackend] Add test with inductive types and patterns

* [cbackend] Fix indentation

* [cbackend] Remove ExpressionTyped case

https://github.com/heliaxdev/minijuvix/issues/79

* [lexer] Fix lexing of \ inside a foreign block

* [cbackend] PR review fixes

* [chore] Remove unused import

* [cbackend] Rename CJuvix to MiniC

* [cbackend] Rename MonoJuvixToC to MonoJuvixToMiniC

* [cbackend] Add test for polymorphic function

* [cbackend] Add module for string literals
2022-05-05 14:12:17 +01:00
Jonathan Cubides
2b4cc3ee36
Add automatically updates/issues/merged PRs to the changelog (#74)
* [ .gitignore ] updated

* Add updated changelog waiting for new PRs

* Fixed minor typos
2022-05-04 14:06:29 +02:00
Jonathan Prieto-Cubides
4d918cd1fd [ CI ] New jobs: ormolu and hlint 2022-04-05 19:57:21 +02:00
Jonathan Prieto-Cubides
a2f65f7c48 [ hlint ] fix some hints 2022-04-04 18:03:56 +02:00
Jonathan Prieto-Cubides
a224d94709 [ pre-commit ] Add support and hooks 2022-04-04 17:44:08 +02:00
Jonathan Prieto-Cubides
eaad611bbf [ CI ] Add Haskell Github Action with Stack test and ormolu check 2022-04-04 15:55:15 +02:00
Jonathan Prieto-Cubides
02474c837f [ Makefile ] add targets with --watch option (stack cmds) and remove unused things 2022-03-25 00:50:18 +01:00
Paul Cadman
903ef6a59b [make] add .PHONY to Makefile targets 2022-03-23 11:13:28 +00:00
Jan Mas Rovira
1a23adc762 add references to the syntax and cleanup code 2022-03-23 11:40:03 +01:00
Jonathan Prieto-Cubides
ee3d73306d [ Makefile ] Adds Template haskell flag for Ormulu 2022-03-18 10:43:56 +01:00
Jonathan Prieto-Cubides
722491048f [ Makefile ] fixies for make prepare-push target 2021-12-30 09:56:58 -05:00
Jonathan Prieto-Cubides
5c3b3d3ad6 [ docs ] added ways to have the docs locally using pandoc 2021-12-04 14:17:49 +01:00
Jonathan Prieto-Cubides
c51bd67095 [ ci ] installer newer haskell version, agda, agda2hs and build all. 2021-12-04 13:25:15 +01:00
Jonathan Prieto-Cubides
4d4ece5590 WIP. Adapting source code from heliaxdev/juvix for parsing purposes. 2021-11-11 20:08:49 +01:00
Jonathan Prieto-Cubides
f18fca0e56 w.i.p. 2021-11-09 14:13:40 +01:00
Jonathan Prieto-Cubides
374e5a08ce [ Makefile ] added "prepare-push" to call hlint, ormolu, and check line witdh. 2021-10-30 11:51:42 +02:00
Jonathan Prieto-Cubides
34cb092a5b [ Makefile ] added build commands, taken from Juvix. 2021-10-26 14:44:54 +02:00
Jonathan Prieto-Cubides
88bf127a75 Add relevancy data type. 2021-10-19 10:09:25 +02:00
Jonathan Prieto-Cubides
a2dfce55c8 [ Makefile ] added formula agda2hs ./src/MiniJuvix/Syntax/Core.agda -o src -X UnicodeSyntax
Writing src/MiniJuvix/Syntax/Core.hs for Core.hs
2021-10-18 19:25:26 +02:00
Jonathan Prieto-Cubides
48abde93b4 First commit, initial project template. 2021-09-26 18:59:51 +02:00