plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Repr.SOP

Synopsis

Documentation

newtype PSOPStruct (struct :: [[S -> Type]]) (s :: S) Source #

@since WIP

Constructors

PSOPStruct 

Fields

Instances

Instances details
(PlutusType (PSOPStruct struct), All2 PEq struct) => PEq (PSOPStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

Methods

(#==) :: forall (s :: S). Term s (PSOPStruct struct) -> Term s (PSOPStruct struct) -> Term s PBool Source #

(SListI2 struct, PSOPStructConstraint struct) => PlutusType (PSOPStruct struct) Source #

@since WIP

Instance details

Defined in Plutarch.Repr.SOP

Associated Types

type PInner (PSOPStruct struct) :: PType Source #

type PCovariant' (PSOPStruct struct) Source #

type PContravariant' (PSOPStruct struct) Source #

type PVariant' (PSOPStruct struct) Source #

Methods

pcon' :: forall (s :: S). PSOPStruct struct s -> Term s (PInner (PSOPStruct struct)) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PSOPStruct struct)) -> (PSOPStruct struct s -> Term s b) -> Term s b Source #

type PContravariant' (PSOPStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PContravariant' (PSOPStruct struct) = All2 PContravariant'' struct
type PCovariant' (PSOPStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PCovariant' (PSOPStruct struct) = All2 PCovariant'' struct
type PInner (PSOPStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPStruct struct) = POpaque
type PVariant' (PSOPStruct struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PVariant' (PSOPStruct struct) = All2 PVariant'' struct

newtype PSOPRec (struct :: [S -> Type]) (s :: S) Source #

@since WIP

Constructors

PSOPRec 

Fields

Instances

Instances details
All PEq struct => PEq (PSOPRec struct) Source #

@since WIP

Instance details

Defined in Plutarch.Repr.SOP

Methods

(#==) :: forall (s :: S). Term s (PSOPRec struct) -> Term s (PSOPRec struct) -> Term s PBool Source #

SListI struct => PlutusType (PSOPRec struct) Source #

@since WIP

Instance details

Defined in Plutarch.Repr.SOP

Associated Types

type PInner (PSOPRec struct) :: PType Source #

type PCovariant' (PSOPRec struct) Source #

type PContravariant' (PSOPRec struct) Source #

type PVariant' (PSOPRec struct) Source #

Methods

pcon' :: forall (s :: S). PSOPRec struct s -> Term s (PInner (PSOPRec struct)) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (PSOPRec struct)) -> (PSOPRec struct s -> Term s b) -> Term s b Source #

type PContravariant' (PSOPRec struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PContravariant' (PSOPRec struct) = All PContravariant'' struct
type PCovariant' (PSOPRec struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PCovariant' (PSOPRec struct) = All PCovariant'' struct
type PInner (PSOPRec struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (PSOPRec struct) = POpaque
type PVariant' (PSOPRec struct) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PVariant' (PSOPRec struct) = All PVariant'' struct

newtype DeriveAsSOPStruct (a :: S -> Type) s Source #

via-derivation helper to derive PlutusType instance using SoP encoding. If your type has only one constructor prefer using DeriveAsSOPRec instead.

@since WIP

Constructors

DeriveAsSOPStruct 

Fields

Instances

Instances details
(Generic (a (Any :: S)), struct ~ UnTermStruct (a (Any :: S)), SListI2 struct, forall (s :: S). StructSameRepr s a struct, PSOPStructConstraint struct) => PlutusType (DeriveAsSOPStruct a) Source #

@since WIP

Instance details

Defined in Plutarch.Repr.SOP

Methods

pcon' :: forall (s :: S). DeriveAsSOPStruct a s -> Term s (PInner (DeriveAsSOPStruct a)) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (DeriveAsSOPStruct a)) -> (DeriveAsSOPStruct a s -> Term s b) -> Term s b Source #

type PContravariant' (DeriveAsSOPStruct a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PCovariant' (DeriveAsSOPStruct a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (DeriveAsSOPStruct a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PVariant' (DeriveAsSOPStruct a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

newtype DeriveAsSOPRec (a :: S -> Type) s Source #

via-derivation helper for SoP encoding, currently behaves exactly like DeriveAsSOPStruct but can be used only on types with a single constructor. It is separate to leave a room for future optimizations

@since WIP

Constructors

DeriveAsSOPRec 

Fields

Instances

Instances details
(Generic (a (Any :: S)), '[struct'] ~ Code (a (Any :: S)), struct ~ UnTermRec struct', SListI struct, forall (s :: S). StructSameRepr s a '[struct], RecTypePrettyError (Code (a (Any :: S)))) => PlutusType (DeriveAsSOPRec a) Source #

@since WIP

Instance details

Defined in Plutarch.Repr.SOP

Methods

pcon' :: forall (s :: S). DeriveAsSOPRec a s -> Term s (PInner (DeriveAsSOPRec a)) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner (DeriveAsSOPRec a)) -> (DeriveAsSOPRec a s -> Term s b) -> Term s b Source #

type PContravariant' (DeriveAsSOPRec a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PCovariant' (DeriveAsSOPRec a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (DeriveAsSOPRec a) Source # 
Instance details

Defined in Plutarch.Repr.SOP

type PInner (DeriveAsSOPRec a) = PSOPRec (UnTermRec (Head (Code (a (Any :: S)))))
type PVariant' (DeriveAsSOPRec a) Source # 
Instance details

Defined in Plutarch.Repr.SOP