Skip to content

Discuss: PlutusData meaning for Prelude types #228

@bladyjoker

Description

@bladyjoker

What is PlutusData (toData and fromData) meaning for all Prelude types?

-- Instances for Prelude types

-- Instances for Prelude types
-- TODO(bladyjoker): Add other Prelude types (Text, Bytes etc.)?
instance PlutusData Bool
instance PlutusData Integer
instance PlutusData (Maybe a) :- PlutusData a
instance PlutusData (List a) :- PlutusData a
instance PlutusData (Either a b) :- PlutusData a, PlutusData b

These are obvious, but we could theoretically define PlutusData for Prelude Char/Text/Bytes/Map/Set.

Gergely's Rust backend already implements some notion of PlutusData for these types.

Should we complete this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions