| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Plutarch.Repr.Tag
Synopsis
- newtype PTag (struct :: [S -> Type]) (s :: S) = PTag {}
- newtype DeriveAsTag (a :: S -> Type) s = DeriveAsTag {
- unDeriveAsTag :: a s
- newtype TagLiftHelper r struct = TagLiftHelper {
- unTagLiftHelper :: Integer -> (SOP I struct -> r) -> r
Documentation
newtype PTag (struct :: [S -> Type]) (s :: S) Source #
Since: 1.10.0
Instances
| PlutusType (PTag struct) Source # | |
Defined in Plutarch.Repr.Tag | |
| Generic (PTag struct s) Source # | |
| Generic (PTag struct s) Source # | Since: 1.10.0 |
| type PInner (PTag struct) Source # | Since: 1.10.0 |
Defined in Plutarch.Repr.Tag | |
| type Rep (PTag struct s) Source # | |
Defined in Plutarch.Repr.Tag | |
| type Code (PTag struct s) Source # | |
Defined in Plutarch.Repr.Tag | |
newtype DeriveAsTag (a :: S -> Type) s Source #
Since: 1.10.0
Constructors
| DeriveAsTag | |
Fields
| |
Instances
| (PlutusType (DeriveAsTag a), Generic (a (Any :: S)), TagTypeConstraints (Any :: S) a struct) => PLiftable (DeriveAsTag a) Source # | |
Defined in Plutarch.Repr.Tag Methods haskToRepr :: AsHaskell (DeriveAsTag a) -> PlutusRepr (DeriveAsTag a) Source # reprToHask :: PlutusRepr (DeriveAsTag a) -> Either LiftError (AsHaskell (DeriveAsTag a)) Source # reprToPlut :: forall (s :: S). PlutusRepr (DeriveAsTag a) -> PLifted s (DeriveAsTag a) Source # plutToRepr :: (forall (s :: S). PLifted s (DeriveAsTag a)) -> Either LiftError (PlutusRepr (DeriveAsTag a)) Source # | |
| Generic (a (Any :: S)) => PValidateData (DeriveAsTag a) Source # | Checks that we have an Since: 1.12.0 |
| (forall (s :: S). TagTypeConstraints s a struct) => PlutusType (DeriveAsTag a) Source # | This derives tag-only PlutusType automatically. Resulted instances will use Example: @@ data PFoo s = A | B | C | D | E deriving stock (GHC.Generic, Show) deriving anyclass (PEq, PIsData) deriving (PlutusType, PLiftable) via DeriveAsTag PFoo instance SOP.Generic (PFoo s) @@ Since: 1.10.0 |
Defined in Plutarch.Repr.Tag Methods pcon' :: forall (s :: S). DeriveAsTag a s -> Term s (PInner (DeriveAsTag a)) Source # pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner (DeriveAsTag a)) -> (DeriveAsTag a s -> Term s b) -> Term s b Source # | |
| type AsHaskell (DeriveAsTag a) Source # | |
Defined in Plutarch.Repr.Tag | |
| type PlutusRepr (DeriveAsTag a) Source # | |
Defined in Plutarch.Repr.Tag | |
| type PInner (DeriveAsTag a) Source # | |
Defined in Plutarch.Repr.Tag | |
newtype TagLiftHelper r struct Source #
Since: 1.10.0
Constructors
| TagLiftHelper | |
Fields
| |