Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add opaque ByteString type to support literal ByteStrings.
- Loading branch information
Showing
29 changed files
with
466 additions
and
228 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
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
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
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
plutus-tx-plugin/test/Plugin/Errors/literalConcatenateBs.plc.golden
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,3 @@ | ||
(program 1.0.0 | ||
(lam x_i0 [ [ (builtin concatenate) (con bytestring #68656c6c6f) ] x_i1 ]) | ||
) |
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 |
---|---|---|
@@ -1 +1 @@ | ||
(con string "hello") | ||
(program [ (builtin decodeUtf8) (con bytestring #68656c6c6f) ]) |
69 changes: 68 additions & 1 deletion
69
plutus-tx-plugin/test/Plugin/Primitives/emptyByteString.plc.golden
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 |
---|---|---|
@@ -1 +1,68 @@ | ||
(program (lam ds (con bytestring) ds)) | ||
(program | ||
(let | ||
(rec) | ||
(datatypebind | ||
(datatype | ||
(tyvardecl List (fun (type) (type))) | ||
(tyvardecl a (type)) | ||
Nil_match | ||
(vardecl Nil [List a]) (vardecl Cons (fun a (fun [List a] [List a]))) | ||
) | ||
) | ||
(let | ||
(nonrec) | ||
(datatypebind | ||
(datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) | ||
) | ||
(let | ||
(rec) | ||
(termbind | ||
(strict) | ||
(vardecl go (fun [List (con char)] (con string))) | ||
(lam | ||
ds | ||
[List (con char)] | ||
[ | ||
[ | ||
[ | ||
{ [ { Nil_match (con char) } ds ] (fun Unit (con string)) } | ||
(lam thunk Unit (con string "")) | ||
] | ||
(lam | ||
x | ||
(con char) | ||
(lam | ||
xs | ||
[List (con char)] | ||
(lam | ||
thunk | ||
Unit | ||
[ | ||
[ (builtin append) [ (builtin charToString) x ] ] | ||
[ go xs ] | ||
] | ||
) | ||
) | ||
) | ||
] | ||
Unit | ||
] | ||
) | ||
) | ||
(let | ||
(nonrec) | ||
(termbind | ||
(nonstrict) | ||
(vardecl stringToBuiltinString (fun [List (con char)] (con string))) | ||
go | ||
) | ||
(lam | ||
ds | ||
[List (con char)] | ||
[ (builtin encodeUtf8) [ stringToBuiltinString ds ] ] | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) |
Oops, something went wrong.