-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that (x :: y :: [||]) is always checked the same as [|x, y|]. Previously this was not the case as the list literal would consider all elements simultaneously in some cases, whereas the cons would only look at the head and tail.
- Loading branch information
Showing
6 changed files
with
134 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
register R : bool | ||
|
||
register X : bits(32) | ||
|
||
val test : unit -> {'n, 'n > 1. list(bits('n))} | ||
|
||
function test() = { | ||
if R then { | ||
[| 0b00, 0b11 |] | ||
} else { | ||
[| match X { _ => 0b000 }, 0b001, 0b100 |] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
val test : unit -> unit | ||
|
||
function test() = { | ||
let _ = [| 0b00, 0b11 |]; | ||
} | ||
|
||
val test2 : unit -> unit | ||
|
||
function test2() = { | ||
let _ = [| match 0b00 { x => x }, 0b11 |]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[93mType error[0m: | ||
[96mpass/list_infer/v1.sail[0m:8.25-30: | ||
8[96m |[0m let _ = [| 0b00, 0b11, 0b111 |]; | ||
[91m |[0m [91m^---^[0m | ||
[91m |[0m Failed to prove constraint: 3 == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
val test : unit -> unit | ||
|
||
function test() = { | ||
let _ = [| 0b00, 0b11, 0b111 |]; | ||
} |