mirror of
https://github.com/anoma/juvix.git
synced 2024-12-14 08:27:03 +03:00
9bfe20e323
This PR adds a version number to the module name of the
`PackageDescription` module. This allows us to change the Package file
format in a backwards compatible way in the future.
Now the simplest Package.juvix file looks like:
```
module Package;
import PackageDescription.V1 open;
package : Package := defaultPackage;
```
## Adding new versions
The idea is that new versions of the PackageDescription format will be
added as files of the form:
include/package/PackageDescription/Vx.juvix
The correspondence between a version of the PackageDescription file and
the package type name is recorded in
[`packageDescriptionTypes`](9ba869d836/src/Juvix/Compiler/Pipeline/Package/Loader.hs (L15)
).
The `package` identifier type must come from **one** of the versions
of the PackageDescription module.
* Closes https://github.com/anoma/juvix/issues/2452
8 lines
146 B
Plaintext
8 lines
146 B
Plaintext
module Package;
|
|
|
|
import Stdlib.Prelude open;
|
|
import PackageDescription.V1 open;
|
|
|
|
package : Package :=
|
|
defaultPackage {name := "package-juvix"};
|