-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PlutusTx] [Builtins] Split 'FromBuiltin' and 'ToBuiltin' #5971
Merged
effectfully
merged 12 commits into
master
from
effectfully/builtins/split-FromBuiltin-and-ToBuiltin-into-IsBuiltin-and-IsOpaque
May 15, 2024
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1f7f634
Try naive type families
effectfully 94ff0ff
Split 'Has*' into 'From*' and 'To*' again
effectfully 1f0d147
Remove type families from '*Opaque'
effectfully 8a02b66
Add 'ToBuiltin'
effectfully 669e25f
Add 'TestInstances'
effectfully bb18d98
Make it work for GHC-8.10
effectfully 0ec5c85
Polishing
effectfully 173ee90
Improve docs
effectfully 6e329d6
Polishing
effectfully 29f0b1a
Address comments
effectfully 0cc3acf
Address comments
effectfully 5b7b797
Irrelevant tweaking
effectfully File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -247,6 +247,14 @@ | |
) | ||
) | ||
) | ||
(termbind | ||
(nonstrict) | ||
(vardecl | ||
`$fHasFromOpaqueBuiltinDataBuiltinData_$cfromOpaque` | ||
(fun (con data) (con data)) | ||
) | ||
(lam eta (con data) eta) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the |
||
) | ||
(termbind | ||
(strict) | ||
(vardecl | ||
|
@@ -271,7 +279,7 @@ | |
(termbind | ||
(nonstrict) | ||
(vardecl | ||
`$fFromBuiltinBuiltinListList_$cfromBuiltin` | ||
`$fHasFromOpaqueBuiltinListList_$cfromOpaque` | ||
(all | ||
arep | ||
(type) | ||
|
@@ -292,7 +300,7 @@ | |
a | ||
(type) | ||
(lam | ||
`$dFromBuiltin` | ||
`$dHasFromOpaque` | ||
[ [ (lam arep (type) (lam a (type) (fun arep a))) arep ] a ] | ||
(let | ||
(rec) | ||
|
@@ -323,7 +331,7 @@ | |
[ | ||
[ | ||
{ Cons a } | ||
[ `$dFromBuiltin` [ { head arep } l ] ] | ||
[ `$dHasFromOpaque` [ { head arep } l ] ] | ||
] | ||
[ go [ { tail arep } l ] ] | ||
] | ||
|
@@ -347,11 +355,6 @@ | |
) | ||
(builtin fstPair) | ||
) | ||
(termbind | ||
(nonstrict) | ||
(vardecl id (all a (type) (fun a a))) | ||
(abs a (type) (lam x a x)) | ||
) | ||
(termbind | ||
(strict) | ||
(vardecl | ||
|
@@ -405,12 +408,12 @@ | |
[ | ||
{ | ||
{ | ||
`$fFromBuiltinBuiltinListList_$cfromBuiltin` | ||
`$fHasFromOpaqueBuiltinListList_$cfromOpaque` | ||
(con data) | ||
} | ||
(con data) | ||
} | ||
{ id (con data) } | ||
`$fHasFromOpaqueBuiltinDataBuiltinData_$cfromOpaque` | ||
] | ||
a | ||
] | ||
|
5 changes: 5 additions & 0 deletions
5
...4001_effectfully_split_FromBuiltin_and_ToBuiltin_into_IsBuiltin_and_IsOpaque.md
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 @@ | ||
### Changed | ||
|
||
- Split `PlutusTx.Builtins.Class` into `PlutusTx.Builtins.HasBuiltin` and `PlutusTx.Builtins.HasOpaque` in #5971: | ||
+ Split 'FromBuiltin' into 'HasFromBuiltin' and 'HasFromOpaque' | ||
+ Split 'ToBuiltin' into 'HasToBuiltin' and 'HasToOpaque' |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was no reason to make it a class synonym before, but now it's convenient, since we partially apply it in the
TestAllBuiltinsSatisfy
instances below.