<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sail/test/typecheck/fail, branch sail2</title>
<subtitle>Formal specification language for ISAs</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/'/>
<entry>
<title>Forbid duplicate top-level letbindings</title>
<updated>2020-08-06T16:22:47+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2020-08-06T16:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=be32e9e3d3e70ddea1ecfc41dafbc054060b7b78'/>
<id>be32e9e3d3e70ddea1ecfc41dafbc054060b7b78</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update duplicate ctor warning</title>
<updated>2020-07-15T12:55:12+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2020-07-15T12:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=71db59830383b7db5316b5c99ccebe776fc837dc'/>
<id>71db59830383b7db5316b5c99ccebe776fc837dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test files missed from last commit</title>
<updated>2020-07-15T10:22:31+00:00</updated>
<author>
<name>Mark Wassell</name>
</author>
<published>2020-07-15T10:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=71694474c5d59f61fb6b96ac396d30c6c43a2c73'/>
<id>71694474c5d59f61fb6b96ac396d30c6c43a2c73</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Generate nice error messages for patterns woth duplicate bindings</title>
<updated>2020-06-05T14:03:39+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2020-06-05T14:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=17a2c725ace3b2382582915a02b9b4c64f4d167d'/>
<id>17a2c725ace3b2382582915a02b9b4c64f4d167d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve a particularly unhelpful type error</title>
<updated>2020-03-19T23:30:08+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2020-03-19T23:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=fe87bb2c265fde375a1977f8e38c0b1e9162872a'/>
<id>fe87bb2c265fde375a1977f8e38c0b1e9162872a</id>
<content type='text'>
From:

No type variable 'ex14#

to:

Type error:
[../and_let_bool.sail]:6:19-50
6 |  and_bool(let y : bool = x in not_bool(y), x)
  |           ^-----------------------------^
  | The type variable 'ex14# would leak into an outer scope.
  |
  | Try adding a type annotation to this expression.
  | This error was caused by:
  | [../and_let_bool.sail]:6:23-24
  | 6 |  and_bool(let y : bool = x in not_bool(y), x)
  |   |               ^
  |   | Type variable 'ex14# was introduced here
  |
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From:

No type variable 'ex14#

to:

Type error:
[../and_let_bool.sail]:6:19-50
6 |  and_bool(let y : bool = x in not_bool(y), x)
  |           ^-----------------------------^
  | The type variable 'ex14# would leak into an outer scope.
  |
  | Try adding a type annotation to this expression.
  | This error was caused by:
  | [../and_let_bool.sail]:6:23-24
  | 6 |  and_bool(let y : bool = x in not_bool(y), x)
  |   |               ^
  |   | Type variable 'ex14# was introduced here
  |
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure we test that struct literals have a complete set of fields. Fixes #60</title>
<updated>2020-02-21T18:51:37+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2020-02-21T18:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=a9627e00d3141153958e448c2814ea906f837566'/>
<id>a9627e00d3141153958e448c2814ea906f837566</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix soundness bug found by Mark</title>
<updated>2020-01-31T14:10:11+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2020-01-31T14:07:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=8890d715d824c8ddec17f654a652974e9ce17ce6'/>
<id>8890d715d824c8ddec17f654a652974e9ce17ce6</id>
<content type='text'>
When returning a type from a letbinding we need to be careful that the
type it returns does not refer to any type variable that only exists for
the lifetime of the letbinding (because it was bound by it). Normally
this fails because any type variable bound in the inner letbinding won't
exist in the outer scope, but if it is shadowed this can cause an issue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When returning a type from a letbinding we need to be careful that the
type it returns does not refer to any type variable that only exists for
the lifetime of the letbinding (because it was bound by it). Normally
this fails because any type variable bound in the inner letbinding won't
exist in the outer scope, but if it is shadowed this can cause an issue.
</pre>
</div>
</content>
</entry>
<entry>
<title>Forbid types declared after a scattered union being used in clauses</title>
<updated>2019-11-05T20:08:28+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2019-11-05T20:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=03cda7bbb5dccd6d6be4bc9c5d11fcaef5031e18'/>
<id>03cda7bbb5dccd6d6be4bc9c5d11fcaef5031e18</id>
<content type='text'>
The following is therefore always forbidden

```
scattered union U

enum E = A | B | C

union clause U = Ctor : E
```

We attempt to detect when this occurs and include a hint indicating the
likely reason why a 'Undefined type E' error might occur in this
circumstance
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following is therefore always forbidden

```
scattered union U

enum E = A | B | C

union clause U = Ctor : E
```

We attempt to detect when this occurs and include a hint indicating the
likely reason why a 'Undefined type E' error might occur in this
circumstance
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve type error for recursive types slightly</title>
<updated>2019-11-05T18:55:59+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2019-11-05T18:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=d474f256c7dfde3af9ef089ad9de5b7ff01f2d9f'/>
<id>d474f256c7dfde3af9ef089ad9de5b7ff01f2d9f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure we correctly forbid recursive datatypes that we don't want to support</title>
<updated>2019-11-05T18:39:21+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2019-11-05T18:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=1edd0e73a7d19904639341fd360fff5fa3ff4fec'/>
<id>1edd0e73a7d19904639341fd360fff5fa3ff4fec</id>
<content type='text'>
Ensure we give a nice error message that explains that recursive types are forbidden

```
Type error:
[struct_rec.sail]:3:10-11
3 |  field : S
  |          ^
  | Undefined type S
  | This error was caused by:
  | [struct_rec.sail]:2:0-4:1
  | 2 |struct S = {
  |   |^-----------
  | 4 |}
  |   |^
  |   | Recursive types are not allowed
```

The theorem prover backends create a special register_value union that
can be recursive, so we make sure to special case that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure we give a nice error message that explains that recursive types are forbidden

```
Type error:
[struct_rec.sail]:3:10-11
3 |  field : S
  |          ^
  | Undefined type S
  | This error was caused by:
  | [struct_rec.sail]:2:0-4:1
  | 2 |struct S = {
  |   |^-----------
  | 4 |}
  |   |^
  |   | Recursive types are not allowed
```

The theorem prover backends create a special register_value union that
can be recursive, so we make sure to special case that.
</pre>
</div>
</content>
</entry>
</feed>
