Skip to content

Commit

Permalink
v0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Sep 29, 2019
1 parent 6bfb4f5 commit 116e971
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.4.1 - 2019-09-29

- Struct types with parameterised fields are now registered with the correct
number of type parameters.

## v0.4.0 - 2019-09-19

- The struct data type has be introduced. Structs are pre-declared user
Expand Down
2 changes: 1 addition & 1 deletion gleam/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gleam/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gleam"
version = "0.4.0"
version = "0.4.1"
authors = ["Louis Pilfold <[email protected]>"]
edition = "2018"

Expand Down
10 changes: 9 additions & 1 deletion gleam/src/typ.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ pub fn infer_module(
TypeConstructorInfo {
module: module_name.clone(),
public,
arity: fields.len(),
arity: type_args.len(),
},
);
// Build return type and collect type vars that can be used by the constructor
Expand Down Expand Up @@ -3699,6 +3699,14 @@ pub fn two() { one() + zero() }",
("third", "fn(Tup(a, b, c)) -> c"),
],
},
Case {
src: "pub struct Box(x) { label: String contents: x }
pub fn id(x: Box(y)) { x }",
module: vec![
("Box", "fn(String, a) -> Box(a)"),
("id", "fn(Box(a)) -> Box(a)"),
],
},
// Case {
// src: "pub struct Box(a) { boxed: a }
// pub fn unbox_int(b: Box(Int)) { b.boxed }",
Expand Down

0 comments on commit 116e971

Please sign in to comment.