Plutonomicon / plutarch-plutus

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

`PValue` must be wrapped in `PDataNewtype` #692

Open SeungheonOh opened 2 months ago

SeungheonOh commented 2 months ago

Currently, it's just raw newtype of PBuiltinList which breaks the PTryFrom subtype checking. We should wrap PBuiltinList with PDataNewtype so that we can ensure it is represented as Data all time when used as ledger types

SeungheonOh commented 2 months ago

Since PMap can also be used for non-ledger, non-data encoded type, we might want to take a look at making a new type specifically for ledger types.

kozross commented 2 months ago

PMap is used nowhere but the ledger API. I don't think I object terribly to making it ledger-only, as it'll reduce type creep.