Skip to content
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

Add functions for working with booleans, and more synonyms to built in functions #30

Merged
merged 17 commits into from
Dec 27, 2021
Merged

Conversation

TotallyNotChase
Copy link
Collaborator

@TotallyNotChase TotallyNotChase commented Dec 24, 2021

This should finish up with adding almost all the remaining builtin functions as plutarch synonyms. The only ones that are left are about building lists (MkCons, MkNilData, MkNilPairData), building pairs (MkPairData), and building Data (ConstrData, MapData, ListData, IData, BData).

  • Add pnot, #&&, and #||. Functions for working with PBool terms.
  • Implement PEq, POrd, Semigroup, and Monoid for PUnit terms.
  • Add the PIntegral typeclass alongside its PInteger instance. (uses DivideInteger, ModInteger etc)
  • Add synonyms to the cryptography builtins. (see: Plutarch.Crypto)
  • Add synonyms to builtins that work with PByteString, ConsByteString, LengthByteString etc.
  • Add ppack :: [Word8] -> Term s PByteString
  • Add synonyms to (en|de)codeUTF8 builtins.

Copy link
Member

@L-as L-as left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me!

Plutarch/Bool.hs Outdated Show resolved Hide resolved
Plutarch/ByteString.hs Outdated Show resolved Hide resolved
Plutarch/ByteString.hs Outdated Show resolved Hide resolved
Plutarch/Integer.hs Outdated Show resolved Hide resolved
Copy link
Member

@L-as L-as left a comment

Choose a reason for hiding this comment

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

LGTM

@L-as L-as merged commit 8ede7b8 into Plutonomicon:master Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants