plutarch-testlib-1.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Test.SpecTypes

Description

Dummy types used in tests

Synopsis

Documentation

data Triplet a Source #

Tuple of three elements of the same type

@since WIP

Constructors

Triplet a a a 

Instances

Instances details
Arbitrary a => Arbitrary (Triplet a) Source #

@since WIP

Instance details

Defined in Plutarch.Test.SpecTypes

Methods

arbitrary :: Gen (Triplet a)

shrink :: Triplet a -> [Triplet a]

Show a => Show (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Eq a => Eq (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

(==) :: Triplet a -> Triplet a -> Bool Source #

(/=) :: Triplet a -> Triplet a -> Bool Source #

Ord a => Ord (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

FromData a => FromData (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

fromBuiltinData :: BuiltinData -> Maybe (Triplet a)

ToData a => ToData (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

toBuiltinData :: Triplet a -> BuiltinData

UnsafeFromData a => UnsafeFromData (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

unsafeFromBuiltinData :: BuiltinData -> Triplet a

Pretty a => Pretty (Triplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

pretty :: Triplet a -> Doc ann

prettyList :: [Triplet a] -> Doc ann

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

We can defined a data-type using PDataRecord, with labeled fields.

With an appropriate instance of PIsDataRepr, we can automatically derive PDataFields.

@since WIP

Constructors

PTriplet (Term s (PDataRecord '["x" ':= a, "y" ':= a, "z" ':= a])) 

Instances

Instances details
PIsData (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData (PTriplet a)) -> Term s (PTriplet a)

pdataImpl :: forall (s :: S). Term s (PTriplet a) -> Term s PData

PDataFields (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Associated Types

type PFields (PTriplet a) :: [PLabeledType]

Methods

ptoFields :: forall (s :: S). Term s (PTriplet a) -> Term s (PDataRecord (PFields (PTriplet a)))

PEq (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

(#==) :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s PBool

(ToData (AsHaskell a), FromData (AsHaskell a)) => PLiftable (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Associated Types

type AsHaskell (PTriplet a)

type PlutusRepr (PTriplet a)

Methods

toPlutarchRepr :: AsHaskell (PTriplet a) -> PlutusRepr (PTriplet a)

toPlutarch :: forall (s :: S). AsHaskell (PTriplet a) -> PLifted s (PTriplet a)

fromPlutarchRepr :: PlutusRepr (PTriplet a) -> Maybe (AsHaskell (PTriplet a))

fromPlutarch :: (forall (s :: S). PLifted s (PTriplet a)) -> Either LiftError (AsHaskell (PTriplet a))

(POrd a, PIsData a) => POrd (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

pmax :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s (PTriplet a)

pmin :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s (PTriplet a)

(POrd a, PIsData a) => PPartialOrd (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Methods

(#<=) :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s PBool

(#<) :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s PBool

(#>=) :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s PBool

(#>) :: forall (s :: S). Term s (PTriplet a) -> Term s (PTriplet a) -> Term s PBool

DerivePlutusType (PTriplet a) Source #

@since WIP

Instance details

Defined in Plutarch.Test.SpecTypes

Associated Types

type DPTStrat (PTriplet a)

PlutusType (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Associated Types

type PInner (PTriplet a) :: PType

type PCovariant' (PTriplet a)

type PContravariant' (PTriplet a)

type PVariant' (PTriplet a)

Methods

pcon' :: forall (s :: S). PTriplet a s -> Term s (PInner (PTriplet a))

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

Generic (PTriplet a s) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

Associated Types

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

Methods

from :: PTriplet a s -> Rep (PTriplet a s) x Source #

to :: Rep (PTriplet a s) x -> PTriplet a s Source #

type PFields (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type PFields (PTriplet a) = Helper (PInner (PTriplet a))
type AsHaskell (PTriplet a) Source #

@since WIP

Instance details

Defined in Plutarch.Test.SpecTypes

type AsHaskell (PTriplet a) = AsHaskell (DeriveDataPLiftable (PTriplet a) (Triplet (AsHaskell a)))
type PlutusRepr (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type PlutusRepr (PTriplet a) = PlutusRepr (DeriveDataPLiftable (PTriplet a) (Triplet (AsHaskell a)))
type DPTStrat (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type DPTStrat (PTriplet a) = PlutusTypeData
type PContravariant' (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type PContravariant' (PTriplet a) = All2 PContravariant'' (PCode (PTriplet a))
type PCovariant' (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type PCovariant' (PTriplet a) = All2 PCovariant'' (PCode (PTriplet a))
type PInner (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type PInner (PTriplet a) = DerivedPInner (DPTStrat (PTriplet a)) (PTriplet a)
type PVariant' (PTriplet a) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type PVariant' (PTriplet a) = All2 PVariant'' (PCode (PTriplet a))
type Rep (PTriplet a s) Source # 
Instance details

Defined in Plutarch.Test.SpecTypes

type Rep (PTriplet a s) = D1 ('MetaData "PTriplet" "Plutarch.Test.SpecTypes" "plutarch-testlib-1.0.0-DyXfp7cEIs6KRsiNvdoaR" 'True) (C1 ('MetaCons "PTriplet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PDataRecord '["x" ':= a, "y" ':= a, "z" ':= a])))))