1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
juvix/tests
Paul Cadman 20a95ec42d
Extract builtin definitions for loading a Package into bundled package-base package (#2535)
This PR creates a new package that's bundled with the compiler in a
similar way to the stdlib and the package description package.

## The `package-base` Package

This package is called
[package-base](ab4376cf9e/include/package-base)
and contains the minimal set of definitions required to load a Package
file.

The
[`Juvix.Builtin`](ab4376cf9e/include/package-base/Juvix/Builtin/V1.juvix)
module contains:

```
module Juvix.Builtin.V1;

import Juvix.Builtin.V1.Nat open public;
import Juvix.Builtin.V1.Trait.Natural open public;
import Juvix.Builtin.V1.String open public;
import Juvix.Builtin.V1.Bool open public;
import Juvix.Builtin.V1.Maybe open public;
import Juvix.Builtin.V1.List open public;
import Juvix.Builtin.V1.Fixity open public;
```

`Juvix.Builtin.V1.Bool` is required to support backend primitive
integers `Juvix.Builtin.V1.Trait.Natural` is required to support numeric
literals.

## The `PackageDescription.V2` module

This PR also adds a new
[`PackageDescription.V2`](ab4376cf9e/include/package/PackageDescription/V2.juvix)
type that uses the `package-base`. This is to avoid breaking existing
Package files. The Packages files in the repo (except those that test
`PackageDescription.V1`) have also been updated.

## Updating the stdlib

The standard library will be updated to use `Juvix.Builtin.*` modules in
a subsequent PR.

* Part of https://github.com/anoma/juvix/issues/2511
2023-11-30 16:22:18 +00:00
..
Asm New compilation pipeline (#1832) 2023-03-14 16:24:07 +01:00
benchmark Numeric, ordering and equality traits (#2433) 2023-10-09 18:25:01 +02:00
Compilation Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
Core Fold lets when the bound variable occurs at most once (#2231) 2023-06-29 13:02:10 +02:00
examplesExpected Add a test suite for milestone examples (#1920) 2023-03-24 13:16:26 +00:00
Geb/positive Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
Internal Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
negative Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
positive Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
runtime/positive Improve closure calls in the runtime (#2396) 2023-09-29 14:20:00 +02:00
smoke/Commands Extract builtin definitions for loading a Package into bundled package-base package (#2535) 2023-11-30 16:22:18 +00:00
VampIR Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
WithoutPackageFile Fix #2510 (#2512) 2023-11-17 16:10:38 +01:00
.gitattributes Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00