Safe Haskell | None |
---|---|
Language | Haskell2010 |
Flat instances for Plutus Core types. Make sure to read the Note [Stable encoding of PLC] before touching anything in this file. Also see the Notes [Serialising unit annotations] and [Serialising Scripts] before using anything in this file.
Synopsis
- newtype AsSerialize a = AsSerialize {
- unAsSerialize :: a
- safeEncodeBits :: NumBits -> Word8 -> Encoding
Documentation
newtype AsSerialize a Source #
For deriving Flat
instances via Serialize
.
AsSerialize | |
|
Instances
Serialise a => Serialise (AsSerialize a) Source # | |
Defined in PlutusCore.Flat encode :: AsSerialize a -> Encoding decode :: Decoder s (AsSerialize a) encodeList :: [AsSerialize a] -> Encoding decodeList :: Decoder s [AsSerialize a] | |
Serialise a => Flat (AsSerialize a) Source # | |
Defined in PlutusCore.Flat encode :: AsSerialize a -> Encoding decode :: Get (AsSerialize a) size :: AsSerialize a -> NumBits -> NumBits |
safeEncodeBits :: NumBits -> Word8 -> Encoding Source #
Orphan instances
Flat Data Source # | |
Flat Unique Source # | |
Flat TyName Source # | |
Flat Name Source # | |
Flat TyDeBruijn Source # | |
Flat NamedTyDeBruijn Source # | |
encode :: NamedTyDeBruijn -> Encoding decode :: Get NamedTyDeBruijn size :: NamedTyDeBruijn -> NumBits -> NumBits | |
Flat DeBruijn Source # | |
Flat FakeNamedDeBruijn Source # | |
encode :: FakeNamedDeBruijn -> Encoding decode :: Get FakeNamedDeBruijn size :: FakeNamedDeBruijn -> NumBits -> NumBits | |
Flat NamedDeBruijn Source # | |
encode :: NamedDeBruijn -> Encoding decode :: Get NamedDeBruijn size :: NamedDeBruijn -> NumBits -> NumBits | |
Flat Index Source # | |
Closed uni => Flat (SomeTypeIn uni) Source # | |
encode :: SomeTypeIn uni -> Encoding decode :: Get (SomeTypeIn uni) size :: SomeTypeIn uni -> NumBits -> NumBits | |
Flat ann => Flat (Version ann) Source # | |
Flat ann => Flat (Kind ann) Source # | |
Flat (Binder TyName) Source # | |
Flat (Binder Name) Source # | |
Flat (Binder NamedTyDeBruijn) Source # | |
encode :: Binder NamedTyDeBruijn -> Encoding decode :: Get (Binder NamedTyDeBruijn) size :: Binder NamedTyDeBruijn -> NumBits -> NumBits | |
Flat (Binder DeBruijn) Source # | |
Flat (Binder FakeNamedDeBruijn) Source # | |
encode :: Binder FakeNamedDeBruijn -> Encoding decode :: Get (Binder FakeNamedDeBruijn) size :: Binder FakeNamedDeBruijn -> NumBits -> NumBits | |
Flat (Binder NamedDeBruijn) Source # | |
encode :: Binder NamedDeBruijn -> Encoding decode :: Get (Binder NamedDeBruijn) size :: Binder NamedDeBruijn -> NumBits -> NumBits | |
Flat a => Flat (Normalized a) Source # | |
encode :: Normalized a -> Encoding decode :: Get (Normalized a) size :: Normalized a -> NumBits -> NumBits | |
(Closed uni, Everywhere uni Flat) => Flat (Some (ValueOf uni)) Source # | |
(Flat ann, Flat tyname) => Flat (TyVarDecl tyname ann) Source # | |
(Closed uni, Flat ann, Flat tyname) => Flat (Type tyname uni ann) Source # | |
(Flat ann, Flat (Term tyname name uni fun ann)) => Flat (Program tyname name uni fun ann) Source # | |
(Closed uni, Everywhere uni Flat, Flat fun, Flat ann, Flat tyname, Flat name) => Flat (Term tyname name uni fun ann) Source # | |
(Closed uni, Flat fun, Flat ann, Flat tyname, Flat name) => Flat (VarDecl tyname name uni fun ann) Source # | |