Skip to content

Conversation

@basetunnel
Copy link
Collaborator

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

PR Preview Action v1.6.3

🚀 View preview at
https://IntersectMBO.github.io/plutus/pr-preview/docs/pr-7481/

Built to branch gh-pages at 2025-12-11 12:50 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@basetunnel basetunnel added the No Changelog Required Add this to skip the Changelog Check label Dec 11, 2025
@zliu41 zliu41 requested review from a team and SeungheonOh December 23, 2025 03:16
@Unisay
Copy link
Contributor

Unisay commented Dec 24, 2025

The doc seems useful! I propose to add Plinth examples to accompany UPLC examples, as this user guide is for Plinth and it makes sense to showcase its types/expressions too.

Copy link
Member

@zliu41 zliu41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our convention for docs is to put each sentence on one line. No need to update this one but please keep it in mind in the future.

## Compiling to `case` in Plinth

When compiling Plinth code with the [option](./plinth-compiler-options)
`datatypes=BuiltinCasing`, many standard library functions will be compiled into
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to mention that this option is going away post hard fork (see the comment on the DatatypeStyle data type). Also please make an issue to update this post hard fork.


:::

In UPLC, it is possible to branch on expressions of certain built-in types, like
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention other ways of deconstructing builtin types (e.g., for bool one can use ifThenElse), and why using the new builtin casing feature is better.

lam x (case x (lam a (lam b [(builtin addInteger) a b])))
```

### Integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention that the datatypes=BuiltinCasing optoin is irrelevant to Integer. To take advantage of casing on integer, in Plinth one must use PlutusTx.Builtins.caseInteger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Changelog Required Add this to skip the Changelog Check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants