-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make fromTo and friends return VWord when appropriate (#1436)
Previous, `fromTo` and related functions would always return a `VSeq`. If the type happened to be a `Bit`, this would violate the internal invariant that sequences of `Bit`s are always represented with `VWord`s, leading to the panics observed in #1435. This patch fixes the issue by using the `mkSeq` smart constructor, which chooses between `VWord` and `VSeq` depending on the sequence type. Fixes #1435.
- Loading branch information
1 parent
6fd1a11
commit 4367eee
Showing
4 changed files
with
56 additions
and
16 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,9 @@ | ||
[0..0] # 0 | ||
[0..1] # 0 | ||
0 # [0..0] | ||
[0,1..1] # 0 | ||
[0..<2] # 0 | ||
[0..0 by 2] # 0 | ||
[0..<2 by 2] # 0 | ||
[0..0 down by 2] # 0 | ||
[1..>0 down by 2] # 0 |
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,28 @@ | ||
Loading module Cryptol | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x0 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x1 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'front' of '(Cryptol::#)' | ||
0x0 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x1 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x1 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x0 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x0 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x0 | ||
Showing a specific instance of polymorphic result: | ||
* Using '0' for type argument 'back' of '(Cryptol::#)' | ||
0x1 |