Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dfinity/motoko into joachim/multi…
Browse files Browse the repository at this point in the history
…-value
  • Loading branch information
nomeata committed Oct 22, 2021
2 parents 75f6d1a + ea7e34e commit 3fdb00b
Show file tree
Hide file tree
Showing 263 changed files with 4,973 additions and 700 deletions.
10 changes: 8 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
queue_rules:
- name: default
conditions:
- status-success=tests (ubuntu-latest)
- status-success=tests (macos-latest)

pull_request_rules:
- name: Automatic merge (squash)
conditions:
Expand All @@ -8,9 +14,9 @@ pull_request_rules:
- base=master
- label=automerge-squash
actions:
merge:
queue:
name: default
method: squash
strict: smart
commit_message: title+body
delete_head_branch: {}
- name: Automatic closing succesfull trials
Expand Down
2 changes: 1 addition & 1 deletion Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ squash merge) once CI passes

## Profile the compiler

(This section is currently defuct, and needs to be update to work with the dune
(This section is currently defunct, and needs to be update to work with the dune
build system.)

1. Build with profiling within nix-shell (TODO: How to do with dune)
Expand Down
53 changes: 53 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Motoko compiler changelog

* Add type union and intersection. The type expression

```motoko
T and U
```
produces the greatest lower bound of types `T` and `U`, that is,
the greatest type that is a subtype of both. Dually,

```motoko
T or U
```
produces the least upper bound of types `T` and `U`, that is,
the smallest type that is a supertype of both.

One use case of the former is "extending" an existing object type:

``` motoko
type Person = {name : Text; address : Text};
type Manager = Person and {underlings : [Person]};
```
Similarly, the latter can be used to "extend" a variant type:
```motoko
type Workday = {#mon; #tue; #wed; #thu; #fri};
type Weekday = Workday or {#sat; #sun};
```

== 0.6.11 (2021-10-08)

* Assertion error messages are now reproducible (#2821)

== 0.6.10 (2021-09-23)

* moc

* documentation changes

* motoko-base

* documentation changes

== 0.6.9 (2021-09-15)

* motoko-base

* add Debug.trap : Text -> None (#288)

== 0.6.8 (2021-09-06)

* Introduce primitives for `Int``Float` conversions (#2733)
* Bump LLVM toolchain to version 12 (#2542)
* Support extended name linker sections (#2760)
* Fix crashing bug for formatting huge floats (#2737)

== 0.6.7 (2021-08-16)

* moc
Expand Down
19 changes: 10 additions & 9 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ let haskellPackages = nixpkgs.haskellPackages.override {
}; in
let
rtsBuildInputs = with nixpkgs; [
# pulls in clang (wrapped) and clang-10 (unwrapped)
llvmPackages_10.clang
# pulls in clang (wrapped) and clang-12 (unwrapped)
llvmPackages_12.clang
# pulls in wasm-ld
llvmPackages_10.lld
llvmPackages_10.bintools
llvmPackages_12.lld
llvmPackages_12.bintools
rustc-nightly
cargo-nightly
xargo
Expand All @@ -41,17 +41,17 @@ let
llvmEnv = ''
# When compiling to wasm, we want to have more control over the flags,
# so we do not use the nix-provided wrapper in clang
export WASM_CLANG="clang-10"
export WASM_CLANG="clang-12"
export WASM_LD=wasm-ld
# because we use the unwrapped clang, we have to pass in some flags/paths
# that otherwise the wrapped clang would take care for us
export WASM_CLANG_LIB="${nixpkgs.llvmPackages_10.clang-unwrapped.lib}"
export WASM_CLANG_LIB="${nixpkgs.llvmPackages_12.clang-unwrapped.lib}"
# When compiling natively, we want to use `clang` (which is a nixpkgs
# provided wrapper that sets various include paths etc).
# But for some reason it does not handle building for Wasm well, so
# there we use plain clang-10. There is no stdlib there anyways.
export CLANG="${nixpkgs.clang_10}/bin/clang"
# there we use plain clang-12. There is no stdlib there anyways.
export CLANG="${nixpkgs.clang_12}/bin/clang"
'';
in

Expand Down Expand Up @@ -159,7 +159,7 @@ rec {
name = "motoko-rts-deps";
src = subpath ./rts;
sourceRoot = "rts/motoko-rts-tests";
sha256 = "0sy7jglz9pxw2lz0qjyplchcfn78d7789sd93xwybisamjynlniy";
sha256 = "0jyp3j8n5bj5cy1fd26d7h55zmc4v14qc2w8adxqwmsv5riqz41g";
copyLockfile = true;
};
in
Expand Down Expand Up @@ -649,6 +649,7 @@ rec {
nixpkgs.ocamlformat
nixpkgs.ocamlPackages.utop
nixpkgs.niv
nixpkgs.rlwrap # for `rlwrap moc`
]
));

Expand Down
Loading

0 comments on commit 3fdb00b

Please sign in to comment.