| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.QuickCheck.Utils
Synopsis
- data SizedByteString (n :: Natural) where
- pattern SizedByteString :: forall (n :: Natural). ByteString -> SizedByteString n
- unSizedByteString :: forall (n :: Natural). SizedByteString n -> ByteString
- data AsWord64 where
- fromAsWord64 :: AsWord64 -> Integer
Documentation
data SizedByteString (n :: Natural) where Source #
Helper for ByteStrings of a fixed length. We don't expose the
constructor, instead providing a read-only pattern, as well as an accessor
function, to ensure that the size invariant is maintained.
Since: 1.0.0
Bundled Patterns
| pattern SizedByteString :: forall (n :: Natural). ByteString -> SizedByteString n | Read-only pattern for accessing the underlying Since: 1.0.0 |
Instances
unSizedByteString :: forall (n :: Natural). SizedByteString n -> ByteString Source #
Get the underlying ByteString. It is guaranteed to have the length
specified in its type.
Since: 1.0.0
Plutus' ledger API often has to 'fake' Word64 using the much larger
Integer type. This helper is designed to generate Integers that fit into
Word64.
We don't expose the constructor directly; instead, we provide a read-only pattern and an accessor function.
Since: 1.0.0
Bundled Patterns
| pattern AsWord64 :: Integer -> AsWord64 | Read-only pattern for accessing the underlying Since: 1.0.0 |
Instances
| Arbitrary AsWord64 Source # | Since: 1.0.0 |
| CoArbitrary AsWord64 Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.QuickCheck.Utils Methods coarbitrary :: AsWord64 -> Gen b -> Gen b | |
| Function AsWord64 Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.QuickCheck.Utils | |
| Show AsWord64 Source # | Since: 1.0.0 |
| Eq AsWord64 Source # | Since: 1.0.0 |
| Ord AsWord64 Source # | Since: 1.0.0 |
Defined in PlutusLedgerApi.QuickCheck.Utils | |
fromAsWord64 :: AsWord64 -> Integer Source #
Since: 1.0.0