Skip to content

Commit 095d5d5

Browse files
committed
Release: 1.3.7
1 parent 1ac80f0 commit 095d5d5

File tree

11 files changed

+46
-28
lines changed

11 files changed

+46
-28
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
# Changelog
3737
- [Changelog](./changelog.md)
38+
- [V1.3.6](./changelog/1.3.7.md)
3839
- [V1.3.6](./changelog/1.3.6.md)
3940
- [V1.3.5](./changelog/1.3.5.md)
4041
- [v1.3.4](./changelog/1.3.4.md)

src/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
| Version | Links | Date |
66
|---------|-------|------|
7+
| `1.3.7` | [changelog](./changelog/1.3.7.md) \| [github](https://github.com/bismuthlang/bismuth/releases/tag/v1.3.7) | 2025-02-09 |
78
| `1.3.6` | [changelog](./changelog/1.3.6.md) \| [github](https://github.com/bismuthlang/bismuth/releases/tag/v1.3.6) | 2025-01-03 |
89
| `1.3.5` | [changelog](./changelog/1.3.5.md) \| [github](https://github.com/bismuthlang/bismuth/releases/tag/v1.3.5) | 2024-12-22 |
910
| `1.3.4` | [changelog](./changelog/1.3.4.md) \| [github](https://github.com/ahfriedman/bismuth/releases/tag/v1.3.4) \| [gitea](https://gitea.ahfriedman.com/ahf/prism/releases/tag/v1.3.4) | 2024-05-03 |

src/changelog/1.3.7.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 1.3.7 (Pre-Alpha) - 2025-02-09
2+
3+
## BREAKING
4+
- Entry point changed from `program` to `main`
5+
6+
## Features
7+
- Syntax improvements: removed the `define` keyword, added `prog` keyword, and now specification of `Channel` in programs is implicit
8+
- Added in "error-flows" which allows error messages to be displayed in a tree to get a better sense of how an error originated
9+
10+
## Bugs
11+
- Improved nix flake build stability
12+
13+
## Compiler Internals
14+
- Refactored various visitors
15+
- Improved some error messages
16+

src/ref/Misc.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ var b := false; // b will be inferred as having type bool
2222
var c := exec Program<P>; // c will be inferred as having type Channel<dual P>
2323
```
2424

25-
## asChannel(e : T[]) : Channel<!+T> {.code .mb-0}
26-
## asChannel(e : T[N}) : Channel<!+T> {.code .m-0}
27-
## asChannel(e : T) : Channel<!+T> {.code .m-0}
25+
## asChannel(e : T[]) -> Channel<!+T> {.code .mb-0}
26+
## asChannel(e : T[N}) -> Channel<!+T> {.code .m-0}
27+
## asChannel(e : T) -> Channel<!+T> {.code .m-0}
2828
* Since: `1.3.4`
2929
Given an expression `e`, `asChannel` will evaluate it and return the reuslts as a channel that can be iterated through.
3030

@@ -42,7 +42,7 @@ accept(c2){
4242
printf("\n");
4343
```
4444

45-
## copy(e : T) : T {.code}
45+
## copy(e : T) -> T {.code}
4646
Given any non-linear expression `e`, `copy` will return a deep copy of the expression. Note: parenthesis around the expression to be copied are optional.
4747

4848
Example:
@@ -55,7 +55,7 @@ var ptr := Box<int>::init(a);
5555
var c := copy ptr; // c will be a deep copy of ptr
5656
```
5757

58-
## extern \<Identifier\> (T_1, ... T_n) : T_r {.code}
58+
## extern \<Identifier\> (T_1, ... T_n) -> T_r {.code}
5959

6060
Allows one to import a function from another file/the C standard library whose name is `<Identifier>`, has the return type `T_r`, and has the arguments `T_1, ..., T_n`. This function is likely to be deprecated in favor of an easier system for importing resources—including other types (e.g., programs, structs, enums, etc).
6161

src/ref/types/Box.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Boxes represent a pointer to data of a specified type, `T`, that is being stored
44

55
## Functions
66

7-
### Box\<T\>::init(e : T) : Box\<T\> {.code}
7+
### Box\<T\>::init(e : T) -> Box\<T\> {.code}
88

99
Creates a new value of type `Box<T>` by storing the result of evaluating the expression `e : T`.
1010

src/ref/types/Channel.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ Channels allow asynchronous type-safe communication between two processes. Chann
33

44
## Functions
55

6-
### self.send(e : T) : Unit {.code}
6+
### self.send(e : T) -> Unit {.code}
77
* Given: `self : -T;P`
88
* Action: Sends the result of evaluating expression `e : T` to the remote process. If `e` is linear, the sent value will be copied. If it is non-linear, then the value will be moved to the remote process.
99
* Result: `self : P`
1010

11-
### self.recv() : T {.code}
11+
### self.recv() -> T {.code}
1212
* Given: `self : +T;P`
1313
* Action: Receives a value of type `T` from the remote processs.
1414
* Result: `self : P`
1515

16-
### unfold(self) : Unit {.code}
16+
### unfold(self) -> Unit {.code}
1717
* Given: `self : ?P_1;P_2`
1818
* Action: Unfolds an interation of `P_1` from `?P_1`.
1919
* Result: `self : P_1;?P_1;P_2`
2020

21-
### unfold(self) : Unit {.code}
21+
### unfold(self) -> Unit {.code}
2222
* Given: `self : *?P_1;P_2`
2323
* Action: Unfolds an interation of `P_1` from `*?P_1` (`P_1` is guarded).
2424
* Result: `self : P_1;*?P_1;P_2`
2525

26-
### more(self) : Unit {.code}
26+
### more(self) -> Unit {.code}
2727
*Deprecated; See unfold.*
2828

29-
### more(self) : Unit {.code}
29+
### more(self) -> Unit {.code}
3030
*Deprecated; See unfold.*
3131

32-
### weaken(self) : Unit {.code}
32+
### weaken(self) -> Unit {.code}
3333
* Given: `self : ?P_1T;P_2`
3434
* Action: Finishes loop `?P_1`.
3535
* Result: `self : P_2`
@@ -45,7 +45,7 @@ Channels allow asynchronous type-safe communication between two processes. Chann
4545
* Result: `self : P_i`
4646

4747

48-
### self.cancel() : Unit {.code}
48+
### self.cancel() -> Unit {.code}
4949
* Since: `1.3.4`
5050
* Given: `self : Cancelable<...Cancelable<P_1>;P_2>;P_3`
5151
* Action: Cancels (skips over) the innermost session type

src/ref/types/Program.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Currently programs also serve as the main entrypoint to a bismuth program. Speci
88

99
Programs are currently defined using the following syntax:
1010
```bismuth
11-
define <NAME> :: <CHANNEL ID> : Channel<<SESSION TYPE>> {
11+
prog <NAME> :: <CHANNEL ID> : <SESSION TYPE> {
1212
// Code
1313
}
1414
```
@@ -17,7 +17,8 @@ In this syntax, `<NAME>` represents the name of the program, `<CHANNEL ID>` is t
1717
For example consider the following program:
1818

1919
```bismuth
20-
define foo :: c : Channel<-int> {
20+
prog foo :: c : -int {
21+
# c : Channel<-int>
2122
c.send(0);
2223
}
2324
```

src/ref/types/enum.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Enums can either be anonymous (defined in-place) or named. Anonymous enums are d
1010

1111
Named enums are defined using the following syntax:
1212
```bismuth
13-
define enum <NAME> {
13+
enum <NAME> {
1414
T_1,
1515
...,
1616
T_n
@@ -20,9 +20,9 @@ define enum <NAME> {
2020
Unlike anonymous enums which are equivalent based on the types they can contain, named enums are seen as equal based on instance of the defined type. For example:
2121

2222
```bismuth
23-
define enum Foo { int, boolean }
23+
enum Foo { int, boolean }
2424
25-
define enum Bar { int, boolean }
25+
enum Bar { int, boolean }
2626
2727
Foo f := 5;
2828
Bar b := 5;

src/ref/types/func.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ Functions are synchronous snippets of code that can take parameters and return a
77
Functions can either be anonymous (defined in-place) or named. Anonymous funcs are defined using the syntax where `T_i` represents the type of the ith parameter which is named `N_n`, `T_r` is the type of data returnd by the function, and the code between the `{}` braces defines the body of the function:
88

99
```bismuth
10-
(T_1 N_1, ... , T_n N_n) : T_r {...}
10+
(T_1 N_1, ... , T_n N_n) -> T_r {...}
1111
```
1212

1313
For example, an anonymous function to square a number could be defined as follows:
1414
```bismuth
15-
(int i) : int { return i * i; }
15+
(int i) -> int { return i * i; }
1616
```
1717

1818
Functions can be stored as values or called in-line with their anonymous definition as shown below:
1919
```bismuth
20-
(int) -> int square := (int i) : int { return i * i; }
21-
int result1 := (int i) : int { return i * i; }(2); // 4
20+
(int) -> int square := (int i) -> int { return i * i; }
21+
int result1 := (int i) -> int { return i * i; }(2); // 4
2222
int result2 := square(2); // 4
2323
```
2424

2525
Functions can also be defined with a name to enable recursive use:
2626
```bismuth
27-
define func fib(int n) : int {
27+
func fib(int n) -> int {
2828
if(n == 0 | n == 1) {
2929
return n;
3030
}

src/ref/types/struct.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Structs (AKA. Product types) respresent a type of data which stores a value that
66

77
Structs are defined using the following syntax where `T_i` represents the type of the data stored by the field labeled by `N_i`:
88
```bismuth
9-
define enum <NAME> {
9+
enum <NAME> {
1010
T_1 N_1;
1111
...,
1212
T_n N_n;
@@ -15,7 +15,7 @@ define enum <NAME> {
1515

1616
For example, a linked list of integers could be defined as follows:
1717
```bismuth
18-
define enum ListNode {
18+
enum ListNode {
1919
int value;
2020
(Unit + Box<ListNode>) next;
2121
}

0 commit comments

Comments
 (0)