-
Notifications
You must be signed in to change notification settings - Fork 502
PlutusTx.Data.List & PlutusTx.BuiltinList - Feature Parity #7055
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
Conversation
Co-authored-by: Yura <[email protected]>
| \(xs : list integer) -> | ||
| let | ||
| !x : Unit = trace {Unit} "PT21" Unit | ||
| in | ||
| error {integer} |
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.
What an optimisation!
However, you might want to switch optimisations off, as they go too far reducing this test to the form where its not testing what you want in runtime, instead eliminating the whole problem (test setup) in compile time.
| (constr 0 []) | ||
| (constr 0 [])))) | ||
| (\str -> (\x -> error) (force trace str (constr 0 []))))) No newline at end of file | ||
| (program 1.1.0 (\xs -> (\x -> error) (force trace "PT21" (constr 0 [])))) No newline at end of file |
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.
Same here: the aspect you're trying to test (how are negative indexes handled) got optimised away.
| let | ||
| !x : Unit = trace {Unit} "PT22" Unit | ||
| in | ||
| error {Unit -> integer}) |
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.
Looks like error here is unconditional too...
| ((\x xs ds _ann -> x) (force headList l) (force tailList l)))) | ||
| (constr 0 []) | ||
| (constr 0 [])) | ||
| (force dropList 10 xs))) |
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.
ifThenElse got eliminated...
PlutusTx.Data.ListandPlutusTx.BuiltinList.mayMaybefunction toPlutusTx.List"PT23","PT24","PT25"error codes