Plutonomicon / plutarch-plutus

Typed eDSL for writing UPLC /ˈpluː.tɑːk/
MIT License
124 stars 64 forks source link

Tagging evaluated terms #541

Closed SeungheonOh closed 2 years ago

SeungheonOh commented 2 years ago

540

SeungheonOh commented 2 years ago

We can make pconstant and pcon to return evaluated term in right cases, and I tried it. But that would be a more significant rewrites and I'm not sure if that's what we want to do.

For example, we need to add new associative type to PlutusType that indicate if pcon returns evaluated term or not. We also need to rewrite many many functions to take accept both evaluated and unevaluated terms. I don't think we should do this...

L-as commented 2 years ago

This is a very big change that is also incompatible with Plutarch 2.0. It's not clear to me why you need this though, what's wrong with having a EvaluatedTerm newtype?

SeungheonOh commented 2 years ago

new type wrapper requires having a whole new sets of functions rewritten for evaluated terms. Instead, having this tag allows us to use what Plutarch itself offers like papp.


From: Las Safin @.> Sent: Saturday, August 13, 2022 5:12 AM To: Plutonomicon/plutarch-plutus @.> Cc: SeungheonOh @.>; Author @.> Subject: Re: [Plutonomicon/plutarch-plutus] Tagging evaluated terms (PR #541)

This is a very big change that is also incompatible with Plutarch 2.0. It's not clear to me why you need this though, what's wrong with having a EvaluatedTerm newtype?

— Reply to this email directly, view it on GitHubhttps://github.com/Plutonomicon/plutarch-plutus/pull/541#issuecomment-1214132228, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZFUUVGULVO4RKDSTRKTCDVY5YIVANCNFSM56NRZI6A. You are receiving this because you authored the thread.Message ID: @.***>

SeungheonOh commented 2 years ago

Actually, I getting more skeptical about this because it's largely confusing to use and write codes on it. While it would still be very helpful to use operators from Plutarch itself when using EvaluatedTerm, this is a too much effort just for that.