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

576 Commits

Author SHA1 Message Date
Łukasz Czajka
4c5fee3e95
Compute name dependency graph and filter unreachable definitions (#1408)
* Compute name dependency graph and filter unreachable declarations

* bugfix: recurse into type signatures

* positive tests

* make ormolu happy

* get starting nodes from ExportInfo

* make ormolu happy

* cosmetic refactoring of DependencyInfo

* fix tests & style
2022-07-25 18:38:44 +02:00
janmasrovira
d70cbc6c94
Add Fail effect (#1409) (#1411)
* Refactor in progress

* Fixing imports and missing references

* add Fail effect

* fix imports

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
2022-07-25 17:51:42 +02:00
Jonathan Cubides
a6ac12cdca
Refactor of typechecking and other checking processes (#1410)
* Refactor in progress

* Fixing imports and missing references

* Remove unnecessary import
2022-07-25 17:14:13 +02:00
janmasrovira
39a300eaa2
Support type aliases (#1404)
* add a simple positive test

* add lambda expressions to microjuvix language

* add basic normalization of type aliases

* fix test name

* normalize only functions on types

* normalize when matching

* fix type of inductive names

* improve detection of normalizing functions

* remove obsolete comment

* match constructor return type

* add test for issue 1333

* fix existing tests

* use lambda case

* add strong normalization

* Add test cases for type aliases and another fix

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
2022-07-25 12:30:18 +02:00
Jonathan Cubides
423ccec70a
Add positivity check for inductive types (#1393)
* w.i.p

* Added strict positivity condition for datatypes w.i.p

* Add negative test for str.postivity check

* Add some revisions

* the branch is back to feet

* w.i.p add lots of traces to check alg.

* Add more test and revisions

* Add negative and positive test to the new flag and the keyword

* Fix shell tests.

* Make pre-commit happy

* Fix rebase conflicts

* Make pre-commit happy

* Add shell test, rename keyword, fix error msg

* Revert change

* Necessary changes

* Remove wrong unless

* Move the positivity checker to its own folder

* Add missing juvix.yaml

* Add a negative test thanks to jan

* make some style changes

* Make ormolu happy

* Remove unnecessary instance of Show

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2022-07-23 09:27:12 +02:00
janmasrovira
e939f8fe9f
Keep qualified names (#1392)
* keep qualified names

* add comment

* add pretty field to Abstract Name

* add test

* Add shell test

* Add another test

* fix shell test

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
2022-07-21 15:54:08 +02:00
janmasrovira
c1f4987aaa
Use bold for code in scoper error messages (#1403)
use bold for code in scoper error messages
2022-07-21 15:22:55 +02:00
Jonathan Cubides
a2fd976d78
Replace ppSimple by ppTrace (#1402) 2022-07-20 19:52:20 +02:00
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