Module

Cardano.FromData

#FromDataArgs

class FromDataArgs :: Type -> Symbol -> Type -> Constraintclass FromDataArgs t c a  where

Members

Instances

#FromDataArgsRL

class FromDataArgsRL :: Type -> Symbol -> RowList Type -> Row Type -> Constraintclass FromDataArgsRL t constr list row | t constr list -> row where

A helper typeclass to implement FromDataArgs for records. Adapted from https://github.com/purescript/purescript-quickcheck/blob/v7.1.0/src/Test/QuickCheck/Arbitrary.purs#L247

The second argument is a symbol which represents the name of a record constructor.

The third argument to the class is a RowList.

Members

Instances

#FromDataWithSchema

class FromDataWithSchema t a  where

Replacement for 'FromDataWithIndex'. This converts a type into its Plutus Data representation with the help of a Plutus Data Schema (see TypeLevel.DataSchema) We cannot require that the first type argument 't' is an instance of 'HasPlutusSchema' but in practice instances of this class must have a 't' with a 'HasPlutusSchema' instance as well.

Members

Instances

#genericFromData

genericFromData :: forall (t :: Type) (rep :: Type). Generic t rep => FromDataWithSchema t rep => PlutusData -> Maybe t

Modules