liqwid-plutarch-extra-3.21.1: A collection of Plutarch extras from Liqwid Labs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Plutarch.Extra.Deriving

Synopsis

Documentation

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

Derivation helper to obtain Semigroup and Monoid instances for a type by way of its PInner representation.

Important notes

Do not use this helper for any type a where PInner a ~ a. This will loop the compiler.

Furthermore, only use this derivation if Semigroup and Monoid methods cannot produce invalid values of the type being derived for. For example, if <> between PInners can produce an invalid value of your type, deriving in this manner will allow such values to exist.

Since: 3.14.0

Constructors

FromPInner (Term s a) 

Instances

Instances details
PInnerMonoid a (PInner a) => Monoid (FromPInner a s) Source #

Since: 3.14.0

Instance details

Defined in Plutarch.Extra.Deriving

PInnerSemigroup a (PInner a) => Semigroup (FromPInner a s) Source #

Since: 3.14.0

Instance details

Defined in Plutarch.Extra.Deriving

Methods

(<>) :: FromPInner a s -> FromPInner a s -> FromPInner a s Source #

sconcat :: NonEmpty (FromPInner a s) -> FromPInner a s Source #

stimes :: Integral b => b -> FromPInner a s -> FromPInner a s Source #