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

787 Commits

Author SHA1 Message Date
Łukasz Czajka
e928ae7a8d
Add --show-de-bruijn option to juvix repl (#1694) 2023-01-04 17:09:41 +01:00
Łukasz Czajka
64f126512f
Allow 'terminating' keyword with builtins (#1688)
Fixes #1685
2023-01-04 10:08:10 +01:00
Łukasz Czajka
c55f04dc46
Convert Nat literals to Core integers (#1681)
Now it's possible to write `1 + 2` in the Juvix REPL and not get an
error.

Closes #1645.

Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
2023-01-03 18:52:20 +01:00
Łukasz Czajka
6908ca9440
Remove unicode cons symbol (#1687) 2023-01-03 14:37:19 +01:00
Jonathan Cubides
3fbc9c7c55
Change syntax for ind. data types and forbid the empty data type (#1684)
Closes #1644 #1635
2023-01-03 13:49:04 +01:00
Jonathan Cubides
8f6eb3ebc7
Remove where syntax (#1674)
Closes #1640 #1354
2022-12-23 11:13:11 +01:00
Jonathan Cubides
5f5f12f050
Less verbose output from running make check (#1675) 2022-12-22 15:28:58 +01:00
Jonathan Cubides
9a7b3d33da Update Changelog v0.2.8 🎉 2022-12-20 19:24:24 +01:00
janmasrovira
597eb0fa49
Refactor hie.yaml and add entry in the readme (#1672) 2022-12-20 16:45:48 +01:00
janmasrovira
af63c36574
Support basic dependencies (#1622) 2022-12-20 13:05:40 +01:00
Łukasz Czajka
445376e338
Conversion of Nat representation to JuvixCore integers (#1661)
* nat to int wip

* nat to int wip

* fix condition

* nats in core

* bugfixes

* tests

* make ormolu happy

* fix case
2022-12-20 11:17:39 +01:00
Paul Cadman
af0379a310
Fix inline monospace formatted text in README (#1671) 2022-12-16 10:28:23 +01:00
Paul Cadman
2d4be3b109
Pin mdbook to version 0.4.22 in docs build (#1670)
* Pin mdbook to 0.4.22

mdbook homebrew version (used by the github action to install mdbook)
was bumped to 0.4.23
eb69fcddba
which seems to be incompatible with Ubuntu 20.04 glibc

* Temporarily enable docs build on PRs

* Revert "Temporarily enable docs build on PRs"

This reverts commit e2cf41016c.
2022-12-15 16:56:27 +01:00
Paul Cadman
028aaf4b57
Add option to specify Core transformations to dev internal core-eval (#1669)
Add option to specify Core transformations to `internal core-eval`
2022-12-15 08:52:26 +00:00
Paul Cadman
e8a3cd0780
Add configuration files so the project can be built with cabal (#1667)
* Add files to embed in the exe to extra-source-files

Cabal requires the files to be specified here because it uses an isolated
build work directory.

* Add cabal configuration files

* Document how to use `cabal` with the project
2022-12-14 22:35:02 +01:00
Jonathan Cubides
d091322748
Revert "Ignore binaries generated by running some tests" (#1668)
Revert "Ignore binaries generated by running some tests (#1663)"

This reverts commit 116c4a79a2.
2022-12-14 15:20:08 +00:00
Paul Cadman
e41e0200d8
Add documentation for compiling/running the TicTacToe example (#1664)
* Add documentation for compiling/running the TicTacToe example

* Fix TicTacToe example steps
2022-12-13 11:14:56 +00:00
Jonathan Cubides
116c4a79a2
Ignore binaries generated by running some tests (#1663)
* Ignore binaries generated by running some tests

* Update .gitignore

* Make pre-commit happy

* Fix typo
2022-12-13 09:35:22 +00:00
Łukasz Czajka
bfadbae41e
Move applications inside Lets and Cases (#1659)
* Move applications inside lets and cases

* make ormolu happy
2022-12-13 08:50:24 +00:00
Łukasz Czajka
d9b020ec27
Remove type arguments and type abstractions from Nodes (#1655) 2022-12-12 14:58:25 +01:00
Paul Cadman
503f5279ba
Run shelltests on macOS build (#1658) 2022-12-12 10:26:13 +01:00
Paul Cadman
f4f56b4875
Restore macOS CI build/test (#1657) 2022-12-08 17:51:07 +01:00
Łukasz Czajka
73c8bafd09
Add pretty printing to JuvixAsm code (#1650) 2022-12-08 17:09:56 +01:00
Łukasz Czajka
468a980e66
Remove NameId from Core (#1649) 2022-12-08 10:50:14 +01:00
Łukasz Czajka
f5de5faaef
Translation from JuvixAsm to C (#1619) 2022-12-06 11:33:20 +01:00
Jonathan Cubides
fb2723cb75 Update Changelog v0.2.7 🎉 2022-12-05 11:48:03 +01:00
Jonathan Cubides
6534287e8b Ignore binary files from examples 2022-12-05 11:15:07 +01:00
janmasrovira
2db738a76f
Upgrade stack snapshot to use ghc-9.2.5 (#1621)
* upgrade stack snapshot to use ghc-9.2.5

* use lts-20.2

* Update alpine GHC Dockerfile to 9.2.5

We also build the Juvix runtime before the stack build in the
linux-static-binary workflow file.

* Add some documentation on how to build and deploy the alpine GHC image

* Docker documentation clarification.

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2022-12-02 10:04:56 +01:00
janmasrovira
ca410301b0
Files pure refactor (#1652) 2022-11-30 18:38:06 +01:00
Łukasz Czajka
57a6a7ebec
Fix 'not a primitive type' error message (#1648) 2022-11-30 15:26:44 +00:00
Paul Cadman
3fbf9a3020
Use the same stack version in all CI jobs and remove stack setup step (#1651)
* Remove `stack setup` step as this was only required for macOS

* Use haskell setup action so same version of stack is used in tests and build
2022-11-30 14:58:01 +00:00
janmasrovira
ebfe412d6f
Auto complete argument of 'dev core read -t' (#1616)
autocomplete transformation list in 'dev core read -t'
2022-11-14 16:29:48 +00:00
janmasrovira
169155690b
Eta expansion at the top of each core function definition (#1481) (#1571) 2022-11-14 16:03:28 +01:00
Paul Cadman
d1ec8926c4
Add an emacs function to restart the REPL (#1618) 2022-11-14 09:38:07 +00:00
Paul Cadman
b541972d03
Add types to Core functions and constructors when translating from Internal (#1617)
* Support inductive type and universe expressions

* Support function type expressions

* Add type information to Core function and constructor nodes

* Remove unused do
2022-11-11 12:38:48 +00:00
Paul Cadman
df4036d600
Compute new entrypoint root when loading a file in the REPL (#1615)
* Add shelltests for `juvix repl`

* repl: Compute entrypoint root when loading a file

Previously the REPL would use app root (which could be the current
directory or the project root of the initially loaded file). Thus files
in a different project could not be loaded.

The entrypoint root must be computed each time a new file is `:load`ed.

Adds shell-tests for REPL commands

* Move preludePath to Juvix.Extra.Paths
2022-11-10 11:26:38 +00:00
Paul Cadman
3c9f27dbbf
Add docs for installing the linux binary (#1599) 2022-11-09 20:11:23 +01:00
Łukasz Czajka
d1937ddfa5
Compute maximum runtime stack height in JuvixReg (#1613)
compute max stack height
2022-11-09 18:49:24 +00:00
Paul Cadman
6d66d0ab13
Add juvix-repl-mode for emacs (#1612)
* Adds a major mode for juvix-repl

* juvix-mode: C-c C-l loads file into REPL, if the REPL is running

* Detect ANSI support in Emacs REPL / shell by using hSupportsANSIColor API

* Disable comint echo handling. Juvix REPL does not echo

* repl: whitespace strip input to compile/eval/infer commands
2022-11-09 16:36:40 +01:00
janmasrovira
aa00d34c8c
Make lambda lifting correct when free variables occur in the types of binders (#1609) 2022-11-09 13:25:00 +01:00
Łukasz Czajka
9d4f843262
Precompute maximum heap allocation (#1608) 2022-11-08 13:42:40 +01:00
Łukasz Czajka
0081715747
Use StackInfo and recurseS in the JuvixAsm to JuvixReg translation. (#1610) 2022-11-08 10:45:08 +01:00
Paul Cadman
42081205d3
Remove shelltest threading (#1611)
`juvix` CLI invocations now read/write/delete the standard library in
the project's `.juvix-build/stdlib` directory.

When shelltest runs in threaded mode, two tests may run conflicting IO
operations on the same `.juvix-build/stdlib` directory.
2022-11-08 09:28:17 +01:00
Paul Cadman
5d0123beba
Improvements to Juvix REPL (#1607)
* REPL support reloading

* Reformat :help and add :version command

* repl: Display the currently loaded module in the banner

* repl: Load the Prelude at launch unless --no-prelude or --no-stdlib are set
2022-11-07 17:43:30 +00:00
Łukasz Czajka
0d90a61a98
Compute JuvixAsm stack usage info (#1604) 2022-11-07 15:15:43 +01:00
Paul Cadman
a3b2aa6940
Add translation from Internal to Core (#1567) 2022-11-07 14:47:56 +01:00
Łukasz Czajka
6adf5ed20a
Fix discrepancy between Juvix and WASM pages (#1605) 2022-11-04 13:32:29 +01:00
Murray
5cea26ac7f
Improve As-Pattern parsing (#1603)
* Allow naming nullary constructors without using parentheses
* Negative test cases
2022-11-03 10:02:22 +01:00
Łukasz Czajka
74bfe592f5
Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00
janmasrovira
23c2b9e713
Juvix core recursors should descend into nodes stored in infos (#1600) 2022-11-02 14:06:40 +01:00