1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-22 14:21:30 +03:00
Commit Graph

818 Commits

Author SHA1 Message Date
Jonathan Cubides
ca2f3c4b13
Add debugging custom function to Prelude (#1401)
* Add custom functions for tracing

* Renaming debugging functions

* Add minor fixes

* Fix missing names

* Revert changes for ppSimple
2022-07-20 18:13:23 +02:00
Łukasz Czajka
e19fbf489f
Implement some error messages (#1396) (#1400)
* Implement error message for double braces
* Implement error message for implicit pattern on the left of an application
* Implement error message for constructor expected on the left of an application 

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2022-07-20 16:24:03 +02:00
janmasrovira
ac9c460523
Refactor childs of pattern parentheses and braces (#1398) 2022-07-20 15:18:15 +02:00
janmasrovira
a8f4acaca2
Curly braces are allowed nested in patterns (#1380) 2022-07-20 10:33:52 +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
Łukasz Czajka
65a44e0bb5
Direct translation from MicroJuvix to MiniC (#1386) 2022-07-19 15:04:10 +02:00
mariari
d7ad6915d2
Widens the accepted symbol list (#1385)
* Changed the valid symbols from inclusvie to exclusive

* Add test using the new valid symbols
2022-07-18 13:32:43 +02:00
janmasrovira
2ea049cea9
Refine hole in type signature to function type (#1379)
* infer hole in type from pattern

* Refine hole in signature when patterns are found

* fix
2022-07-15 18:39:11 +02:00
janmasrovira
32059965a9
Type checking fails when the type of a pattern is not given by the signature (#1378)
* infer hole in type from pattern

* refactor

* fix error message

* format

* fix matching of identifiers

* improve error message
2022-07-15 17:57:04 +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
bded613ec5
Update Juvix standard-library (#1389)
juvix-stdlib updated
2022-07-15 17:09:42 +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
Paul Cadman
894dea4c6b
Adds Collatz sequence generator example (#1384) 2022-07-15 11:17:22 +01:00
Jonathan Cubides
d11605ab1e
Check all the type parameter names are different when declaring an inductive type (#1377)
* Fix #1334

* Rename error type
2022-07-15 10:58:49 +02:00
Paul Cadman
753c5d5b0b
Set cname for gh-pages action (#1376)
Our docs are now hosted on a custom domain: docs.juvix.org

https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-add-cname-file-cname
2022-07-14 17:37:28 +01:00
Paul Cadman
cff01943f4
Add fibonacci sequence example program (#1375) 2022-07-14 17:03:44 +01:00
Jonathan Cubides
fc6a0bb001
Fix Changelog links and minors (#1371)
* Fix Changelog links and minors

* Use https for homepage link
2022-07-14 11:41:58 +02:00
mariari
ea767ef2b4
Add Version number to the emacs mode (#1320)
Add Juvix-version call to juvix-mode, and fixedup ending )'s
2022-07-13 15:49:06 +02:00
Jonathan Cubides
8f216a590f Update changelog 2022-07-12 21:42:00 +02:00
Jonathan Cubides
eb6819f0c7
Add typecheck and internal command (#270)
* Closes #269

* Add internal command

* w.i.p

* Fix shell tests.

* Rename check command and add shell-tests
2022-07-12 19:08:03 +02:00
Jonathan Cubides
329bec50a9
Label renaming (#275)
* Update bug_report.md

* Update feature_request.md
2022-07-12 12:34:48 +02:00
Roman
1b18ee736e
Update link to Anoma discord (#264) 2022-07-11 18:26:45 +02:00
Jonathan Cubides
a7e34a124e
Improve handling of location information for different objs (#263)
* Add loc for literal and refactor a bit

* w.i.p making symbol a synonym for WithLoc Text

* Finish with symbol

* Update standard library
2022-07-11 17:00:38 +02:00
Jonathan Cubides
40154fcf94
Add issues and PR templates (#261)
* New issues templates

* Create pull_request_template.md

* Make pre-commit happy
2022-07-08 15:19:07 +02:00
Paul Cadman
46132ad187
Include open import statements when generating HTML (#260)
If an `open import` statement is encountered in the traversal of a
module and its dependencies and the referenced module is a top module
then we record it and recurse over the referenced module
2022-07-08 14:57:43 +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
84732b281f
Updates tests to use the updated standard library (#253)
* Updates tests to use the updated stdlib

* Update to minijuvix-stdlib main
2022-07-07 15:35:56 +02:00
Łukasz Czajka
4d5aaa6b32
Enforce C99 standard in the generated C files (#252)
Add '-std=c99' to clang options
2022-07-07 12:13:03 +02:00
Paul Cadman
e557f24b1d
Restore mascot images to the minijuvix book (#250) 2022-07-06 14:23:13 +02:00
janmasrovira
9e6d43dd60
Allow jumping to another module in emacs (#249)
allow jumping to another module in emacs
2022-07-06 12:21:04 +01:00
Paul Cadman
f59df1f329
Restore Juvix mascot image to README (#248)
* Restore Juvix mascot to README

* Excludes assets/ from end-of-file-fixer commit hook
2022-07-06 11:49:58 +02:00
Paul Cadman
66d7d1beef
Add emacs option minijuvix-disable-embedded-stdlib (#247)
When developing the stdlib or any other project that doesn't use the
embedded standard library, the `--no-stdlib` flag must be set on the
compiler commands.

This PR adds a config option `minijuvix-disable-embedded-stdlib` to set
`--no-stdlib` for highlight and flycheck.
2022-07-05 17:55:19 +01:00
Łukasz Czajka
56e75e58f9
Remove the 'eval' and 'print' keywords (#214) (#242) 2022-07-05 16:17:02 +02:00
Łukasz Czajka
5a9dfe23bb
Remove the 'match' keyword (#238)
Remove the 'match' keyword (#215)

Since lambda-expressions will support pattern matching, explicit 'match' is redundant.
2022-07-05 16:09:13 +02:00
Paul Cadman
89ccef3da4
Throw error when reading a file that conflicts with embedded stdlib (#243)
* Throw error when reading a file that conflicts with stdlib

The Files effect first tries to read a file from the embedded stdlib. If
this succeeds and the file also exists in the project then an error is
thrown.

This error can be thrown either at the parsing stage, if the entrypoint
file conflicts with the standard library, or at the scoping stage if an
imported file conflicts.

* Fix module name in test file
2022-07-05 15:54:01 +02:00
Łukasz Czajka
dee2357214
Removes the minihaskell command from CLI (#244)
The command is internal now.
2022-07-05 15:39:45 +02:00
janmasrovira
228c031f55
Add option to disable minijuvix input method (#239) 2022-07-05 11:18:57 +02:00
janmasrovira
57edf1077b
Unify MicroJuvix ASTs representation of types and expressions (#188)
* improve and add Universe to MicroJuvix expressions

* continue with the refactor

* refactor typechecker and aritychecker

* refactor Abstract to Micro

* format

* refactor type calls builder and monojuvix translation

* complete abstract translation

* traversals have betrayed me

* fix monomorphisation and traversals

* update tests

* format

* rename Function2

* remove obsolete comments

* fix comment
2022-07-04 18:15:35 +02:00
Łukasz Czajka
292f2400d6
Merge pull request #236 from lukaszcz/main
Removed tests/positive/HelloWorld.mjuvix and specified clang version in the documentation
2022-07-04 18:04:21 +02:00
Łukasz Czajka
ff0e87d310
Merge branch 'main' into main 2022-07-04 17:53:17 +02:00
Łukasz Czajka
f1921bbf91
Fix a bug with the path to walloc.c (#237) 2022-07-04 17:53:06 +02:00
Łukasz Czajka
3ad678049b
Merge branch 'main' into main 2022-07-04 17:29:30 +02:00
Lukasz Czajka
7d330df947 remove HelloWorld test 2022-07-04 17:21:11 +02:00
janmasrovira
82d1f3ecf7
Filter symbol entries properly in the scoper (#234) 2022-07-04 16:40:10 +02:00
Lukasz Czajka
5cf65704c1 Removed tests/positive/HelloWorld.mjuvix and specified clang version in the documentation 2022-07-04 14:27:24 +02:00
Paul Cadman
109f3cf472
Use the ModulesCache for open statements in ScopedToAbstract pass (#224)
* Use the ModulesCache for `open` statements

* Refactor using suggestion from Jan
2022-07-03 16:16:46 +01:00
Paul Cadman
1c74c02c83
Perform ScopedToAbstract exactly once for each module (#223)
This commit introduces a cache of Abstract.TopModule that is queried for
each ImportStatement.

Before this change, `registerBuiltin` could be called multiple times for
a module, if it was imported multiple times.
2022-07-01 15:59:52 +01:00
Paul Cadman
d384bd9a89
README: Include --recursive in git clone command to fetch stdlib (#211)
docs: Include `--recursive` in git clone command to fetch stdlib
2022-06-30 18:11:04 +02:00
Jonathan Cubides
2e7d5b4ca2
Update project description v0.2.0 (#209)
* Update README.org

* update corresponding org file descr.

* make pre-commit happy

* cosmetics

* make pre-commit happy

* Github doesn't render correctly the todo list items
2022-06-30 16:33:23 +02:00
Paul Cadman
ed78f2636b
Embed standard library in the minijuvix binary (#210)
* Embed stdlib in minijuvix library

We add a new step at the beginning of the pipeline called Setup that
registers the modules in the standard library with the Files effect. The
standard library is then used when the Scoper queries the Files effect
for modules as it resolves import statements.

Use of the standard library can be disabled using the global
`--no-stdlib` command-line option.

* CI: Checkout submodules recursively for stdlib

* Add a new `--no-stdlib` option to shell check

* Poke CI

* CI: Checkout submodules in the test job
2022-06-30 11:31:08 +02:00