ply-plutarch-0.4.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ply.Plutarch

Synopsis

Documentation

type family PlyArgOf a = r | r -> a Source #

PlyArgOf yields the corresponding Haskell type for a given Plutarch type.

Instances

Instances details
type PlyArgOf PAddress Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PCredential Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PStakingCredential Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PScriptContext Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PScriptPurpose Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PTxInfo Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PPubKeyHash Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PDCert Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PDatum Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PDatumHash Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PRedeemer Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PRedeemerHash Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PScriptHash Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PPOSIXTime Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PTxId Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PTxInInfo Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PTxOut Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PTxOutRef Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PCurrencySymbol Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PTokenName Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PBool Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PData Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PByteString Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PInteger Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PString Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf PRationalData Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PExtended a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PInterval a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PLowerBound a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PUpperBound a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PMaybeData a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PAsData a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PBuiltinList a) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PUnit :: S -> Type) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PUnit :: S -> Type) = ()
type PlyArgOf (PValue 'Sorted 'NonZero) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PBuiltinPair a b) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PMap 'Sorted a b) Source # 
Instance details

Defined in Ply.Plutarch.Class

type PlyArgOf (PMap 'Sorted a b) = Map (PlyArgOf a) (PlyArgOf b)

writeTypedScript Source #

Arguments

:: TypedWriter pt 
=> Config

Plutarch compiler configuration which will be used to compile the script.

-> Text

Description to be associated with the compiled script file, semantically irrelevant.

-> FilePath

File path to save the file to.

-> ClosedTerm pt

The parameterized Plutarch validator/minting policy.

-> IO () 

Write a parameterized Plutarch validator or minting policy into the filesystem.

The result can be read by readTypedScript.

Please also see: typedWriterInfo.

mkEnvelope :: forall ptype. TypedWriter ptype => Config -> Text -> ClosedTerm ptype -> Either Text TypedScriptEnvelope Source #

Wrapper around toTypedScript that builds a TypedScriptEnvelope to serialize into the file system.

toTypedScript :: forall ptype. TypedWriter ptype => Config -> ClosedTerm ptype -> Either Text (TypedScript (RoleOf ptype) (PlyParamsOf (ParamsOf ptype))) Source #

The core `ply-plutarch` function: obtain all the necessary information about a Plutarch script, and turn it into TypedScript.

For a description of extra parameters are determined, see: PlyParamsOf and ParamsOf type families.

For a description of ScriptVersion is determined, see: VersionOf type family.

For a description of ScriptRole is determined, see: RoleOf type family.