plutarch-1.10.1
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Repr.Tag

Synopsis

Documentation

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

Since: 1.10.0

Constructors

PTag 

Fields

Instances

Instances details
PlutusType (PTag struct) Source # 
Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type PInner (PTag struct) :: PType Source #

type PCovariant' (PTag struct) Source #

type PContravariant' (PTag struct) Source #

type PVariant' (PTag struct) Source #

Methods

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

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

Generic (PTag struct s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type Rep (PTag struct s) :: Type -> Type Source #

Methods

from :: PTag struct s -> Rep (PTag struct s) x Source #

to :: Rep (PTag struct s) x -> PTag struct s Source #

Generic (PTag struct s) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type Code (PTag struct s) :: [[Type]]

Methods

from :: PTag struct s -> Rep (PTag struct s)

to :: Rep (PTag struct s) -> PTag struct s

type PContravariant' (PTag struct) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PCovariant' (PTag struct) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PInner (PTag struct) Source #

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Tag

type PInner (PTag struct) = PInner (DeriveNewtypePlutusType (PTag struct))
type PVariant' (PTag struct) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type Rep (PTag struct s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type Rep (PTag struct s) = D1 ('MetaData "PTag" "Plutarch.Repr.Tag" "plutarch-1.10.1-L8uVCYsr0h87jxG2Nmhqfx" 'True) (C1 ('MetaCons "PTag" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PInteger))))
type Code (PTag struct s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type Code (PTag struct s) = GCode (PTag struct s)

newtype TagLiftHelper r struct Source #

Since: 1.10.0

Constructors

TagLiftHelper 

Fields

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

@since IWP

Constructors

DeriveTagPlutusType 

Fields

Instances

Instances details
(forall (s :: S). TagTypeConstraints s a struct) => PlutusType (DeriveTagPlutusType a) Source #

This derives tag-only PlutusType automatically. Resulted instances will use PInteger as underlying type, making this much more efficient than using regular DataScottSOP based encoding. As name suggests, types with no-argument constructors can use this.

Example: @@ data PFoo s = A | B | C | D | E deriving stock (GHC.Generic, Show) deriving anyclass (PEq, PIsData) deriving (PlutusType) via DeriveTagPlutusType PFoo

instance SOP.Generic (PFoo s) @@

Since: 1.10.0

Instance details

Defined in Plutarch.Repr.Tag

Methods

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

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

type PContravariant' (DeriveTagPlutusType a) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PCovariant' (DeriveTagPlutusType a) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PInner (DeriveTagPlutusType a) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PVariant' (DeriveTagPlutusType a) Source # 
Instance details

Defined in Plutarch.Repr.Tag

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

@since WIP

Constructors

DeriveTagPLiftable 

Fields

Instances

Instances details
(PlutusType a, Generic h, TagTypeConstraints (Any :: S) a (Code h)) => PLiftable (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

PlutusType (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

Methods

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

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

Generic (DeriveTagPLiftable a h s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type Rep (DeriveTagPLiftable a h s) :: Type -> Type Source #

Generic (DeriveTagPLiftable a h s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

Associated Types

type Code (DeriveTagPLiftable a h s) :: [[Type]]

Methods

from :: DeriveTagPLiftable a h s -> Rep (DeriveTagPLiftable a h s)

to :: Rep (DeriveTagPLiftable a h s) -> DeriveTagPLiftable a h s

type AsHaskell (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PlutusRepr (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PContravariant' (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PCovariant' (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type PInner (DeriveTagPLiftable a h) Source #

@since WIP

Instance details

Defined in Plutarch.Repr.Tag

type PVariant' (DeriveTagPLiftable a h) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type Rep (DeriveTagPLiftable a h s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type Rep (DeriveTagPLiftable a h s) = D1 ('MetaData "DeriveTagPLiftable" "Plutarch.Repr.Tag" "plutarch-1.10.1-L8uVCYsr0h87jxG2Nmhqfx" 'True) (C1 ('MetaCons "DeriveTagPLiftable" 'PrefixI 'True) (S1 ('MetaSel ('Just "unDeriveTagPLiftable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a s))))
type Code (DeriveTagPLiftable a h s) Source # 
Instance details

Defined in Plutarch.Repr.Tag

type Code (DeriveTagPLiftable a h s) = GCode (DeriveTagPLiftable a h s)