Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Show e ⇒ Error e where
- displayError ∷ e → String
- data family Hash keyrole ∷ Type
- class HasTypeProxy t where
- data AsType t
- proxyToAsType ∷ Proxy t → AsType t
- data FromSomeType (c ∷ Type → Constraint) b where
- FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b
- data FileError e
- class CastHash roleA roleB where
- class HasTypeProxy a ⇒ SerialiseAsRawBytes a where
- serialiseToRawBytes ∷ a → ByteString
- deserialiseFromRawBytes ∷ AsType a → ByteString → Maybe a
- class HasTypeProxy a ⇒ SerialiseAsCBOR a where
- serialiseToCBOR ∷ a → ByteString
- deserialiseFromCBOR ∷ AsType a → ByteString → Either DecoderError a
- data ErrorAsException where
- ErrorAsException ∷ Error e ⇒ e → ErrorAsException
- class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a where
- bech32PrefixFor ∷ a → Text
- bech32PrefixesPermitted ∷ AsType a → [Text]
- data Bech32DecodeError
- serialiseToRawBytesHex ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text
- deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- throwErrorAsException ∷ Error e ⇒ e → IO a
- serialiseToBech32 ∷ a → Text
- deserialiseFromBech32 ∷ AsType a → Text → Either Bech32DecodeError a
- class Typeable a ⇒ FromCBOR a where
- class Typeable a ⇒ ToCBOR a where
- class Typeable a ⇒ EncCBOR a where
- class Typeable a ⇒ DecCBOR a where
- data Proxy (t ∷ k) = Proxy
Documentation
class Show e ⇒ Error e where Source #
displayError ∷ e → String Source #
Instances
Error IOException Source # | |
Defined in Cardano.Api.Any | |
Error Bech32DecodeError Source # | |
Defined in Cardano.Api.Any | |
Error TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
Error ProtocolInstantiationError Source # | |
Defined in Cardano.Node.Protocol | |
Error AlonzoProtocolInstantiationError Source # | |
Error ByronProtocolInstantiationError Source # | |
Error CardanoProtocolInstantiationError Source # | |
Error GenesisReadError Source # | |
Defined in Cardano.Node.Protocol.Shelley | |
Error GenesisValidationError Source # | |
Defined in Cardano.Node.Protocol.Shelley | |
Error PraosLeaderCredentialsError Source # | |
Error ShelleyProtocolInstantiationError Source # | |
Error () Source # | |
Defined in Cardano.Api.Any displayError ∷ () → String Source # | |
Error e ⇒ Error (FileError e) Source # | |
Defined in Cardano.Api.Any displayError ∷ FileError e → String Source # |
data family Hash keyrole ∷ Type Source #
Instances
class HasTypeProxy t where Source #
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
proxyToAsType ∷ Proxy t → AsType t Source #
Instances
data FromSomeType (c ∷ Type → Constraint) b where Source #
FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b |
class HasTypeProxy a ⇒ SerialiseAsRawBytes a where Source #
serialiseToRawBytes ∷ a → ByteString Source #
deserialiseFromRawBytes ∷ AsType a → ByteString → Maybe a Source #
Instances
class HasTypeProxy a ⇒ SerialiseAsCBOR a where Source #
Nothing
serialiseToCBOR ∷ a → ByteString Source #
default serialiseToCBOR ∷ ToCBOR a ⇒ a → ByteString Source #
deserialiseFromCBOR ∷ AsType a → ByteString → Either DecoderError a Source #
default deserialiseFromCBOR ∷ FromCBOR a ⇒ AsType a → ByteString → Either DecoderError a Source #
Instances
data ErrorAsException where Source #
ErrorAsException ∷ Error e ⇒ e → ErrorAsException |
Instances
Exception ErrorAsException Source # | |
Show ErrorAsException Source # | |
Defined in Cardano.Api.Any showsPrec ∷ Int → ErrorAsException → ShowS # show ∷ ErrorAsException → String # showList ∷ [ErrorAsException] → ShowS # |
class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a where Source #
bech32PrefixFor ∷ a → Text Source #
The human readable prefix to use when encoding this value to Bech32.
bech32PrefixesPermitted ∷ AsType a → [Text] Source #
The set of human readable prefixes that can be used for this type.
Instances
data Bech32DecodeError Source #
Instances
Show Bech32DecodeError Source # | |
Defined in Cardano.Api.Any showsPrec ∷ Int → Bech32DecodeError → ShowS # show ∷ Bech32DecodeError → String # showList ∷ [Bech32DecodeError] → ShowS # | |
Error Bech32DecodeError Source # | |
Defined in Cardano.Api.Any |
serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text Source #
deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
throwErrorAsException ∷ Error e ⇒ e → IO a Source #
The preferred approach is to use Except
or ExceptT
, but you can if
necessary use IO exceptions.
serialiseToBech32 ∷ a → Text Source #
deserialiseFromBech32 ∷ AsType a → Text → Either Bech32DecodeError a Source #
class Typeable a ⇒ FromCBOR a where Source #