HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulegrapesy-1.1.1Haskell2010

Network.GRPC.Common

General infrastructure used by both the client and the server

Intended for unqualified import.

  • 24 types
  • 7 classes
  • 8 values
  • Packagegrapesy-1.1.1
  • Exports47
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCommon.hs

Abstraction over different serialization formats

6 declarations
classclass (NFData (Input rpc), NFData (Output rpc), Show (Input rpc), Show (Output rpc), Show (RequestMetadata rpc), Show (ResponseInitialMetadata rpc), Show (ResponseTrailingMetadata rpc)) => IsRPC (rpc :: k) where
#

Abstract definition of an RPC

Note on encoding: the gRPC specification does not say anything about text encoding issues for paths (service names and method names) or message types. The Protobuf compiler (by far the most common instantation of gRPC) does not allow for non-ASCII character at all ("interpreting non ascii codepoint"). We therefore punt on the encoding issue here, and use bytestrings. If applications want to use non-ASCII characters, they can choose their own encoding.

Methods

  • rpcContentType :: Proxy rpc -> ByteString

    Content-type

    gRPC is agnostic to the message format; the spec defines the Content-Type header as

    Content-Type →
      "content-type"
      "application/grpc"
      [("+proto" / "+json" / {custom})]

    defaultRpcContentType can be used in the case that the format (such as proto) is known.

    Note on terminology: throughout this codebase we avoid the terms "encoding" and "decoding", which can be ambiguous. Instead we use "serialize"/"deserialize" and "compress"/"decompress".

  • rpcServiceName :: HasCallStack => Proxy rpc -> ByteString

    Service name

    For Protobuf, this is the fully qualified service name.

  • rpcMethodName :: HasCallStack => Proxy rpc -> ByteString

    Method name

    For Protobuf, this is just the method name (no qualifier required).

  • rpcMessageType :: HasCallStack => Proxy rpc -> Maybe ByteString

    Message type, if specified

    This is used to set the (optional) grpc-message-type header. For Protobuf, this is the fully qualified message type.

Instances3IsRPC
familytype family Input (rpc :: k)
#

Messages from the client to the server

Instances2Input
familytype family Output (rpc :: k)
#

Messages from the server to the client

Instances2Output

Client-side RPC

Methods

  • rpcSerializeInput :: Proxy rpc -> Input rpc -> ByteString

    Serialize RPC input

    We don't ask for a builder here, but instead ask for the complete serialized form. gRPC insists that individual messages are length prefixed, so we must compute the full serialization in memory before we can send anything.

    We use the terms "serialize" and "deserialize" here, and "compress"/"decompress" for compression, rather than "encode"/"decode", which could refer to either process.

  • rpcDeserializeOutput :: Proxy rpc -> ByteString -> Either String (Output rpc)

    Deserialize RPC output

    Discussion of rpcDeserializeInput applies here, also.

Instances3SupportsClientRpc

Server-side RPC

Methods

Instances3SupportsServerRpc

Stream elements

2 declarations
datadata StreamElem b a
#

An element positioned in a stream

Constructors

  • StreamElem !a

    Element in the stream

    The final element in a stream may or may not be marked as final; if it is not, we will only discover after receiving the final element that it was in fact final. Moreover, we do not know ahead of time whether or not the final element will be marked.

    When we receive an element and it is not marked final, this might therefore mean one of two things, without being able to tell which:

    • We are dealing with a stream in which the final element is not marked.

    In this case, the element may or may not be the final element; if it is, the next value will be NoMoreElems (but waiting for the next value might mean a blocking call).

    • We are dealing with a stream in which the final element is marked.

    In this case, this element is not final (and the final element, when we receive it, will be tagged as Final).

  • FinalElem !a !b

    We received the final element

    The final element is annotated with some additional information.

  • NoMoreElems !b

    There are no more elements

    This is used in two situations:

    • The stream didn't contain any elements at all.

    • The final element was not marked as final. See StreamElem for detailed additional discussion.

Instances8Bifoldable, Bifunctor, Bitraversable, Functor, Foldable, Traversable, …
datadata NextElem a
#

Is there a next element in a stream?

Constructors

Instances5Functor, Foldable, Traversable, Eq, Show
  • Functor NextElemDefined in grpc-spec-1.0.0 · Network.GRPC.Spec.RPC.StreamType
  • Foldable NextElemDefined in grpc-spec-1.0.0 · Network.GRPC.Spec.RPC.StreamType
  • Traversable NextElemDefined in grpc-spec-1.0.0 · Network.GRPC.Spec.RPC.StreamType
  • Eq a => Eq (NextElem a)Defined in grpc-spec-1.0.0 · Network.GRPC.Spec.RPC.StreamType
  • Show a => Show (NextElem a)Defined in grpc-spec-1.0.0 · Network.GRPC.Spec.RPC.StreamType

Custom metadata

8 declarations
datadata CustomMetadata
#

Custom metadata

This is an arbitrary set of key-value pairs defined by the application layer.

Custom metadata order is not guaranteed to be preserved except for values with duplicate header names. Duplicate header names may have their values joined with "," as the delimiter and be considered semantically equivalent.

Instances5Eq, Show, Generic, NFData, Rep
datadata HeaderName
#

Header name

To construct a HeaderName, you can either use the IsString instance

"foo"     :: HeaderName -- an ASCII header
"bar-bin" :: HeaderName -- a binary header

or alternatively use the AsciiHeader and BinaryHeader patterns

AsciiHeader  "foo"
BinaryHeader "bar-bin"

The latter style is more explicit, and can catch more errors:

AsciiHeader  "foo-bin" -- exception: unexpected -bin suffix
BinaryHeader "bar"     -- exception: expected   -bin suffix

Header names cannot be empty, and must consist of digits (0-9), lowercase letters (a-z), underscore (_), hyphen (-), or period (.). Reserved header names are disallowed.

See also safeHeaderName.

Instances7Eq, Ord, Show, IsString, Generic, NFData, …
datadata NoMetadata
#

Indicate the absence of custom metadata

NOTE: The ParseMetadata instance for NoMetadata throws an exception if any metadata is present (that is, metadata is not silently ignored).

Instances6Eq, Show, Default, BuildMetadata, ParseMetadata, StaticMetadata

Typed

familytype family RequestMetadata (rpc :: k)
#

Metadata included in the request

Often you can give a blanket metadata definition for all methods in a service. For example:

type instance RequestMetadata          (Protobuf RouteGuide meth) = NoMetadata
type instance ResponseInitialMetadata  (Protobuf RouteGuide meth) = NoMetadata
type instance ResponseTrailingMetadata (Protobuf RouteGuide meth) = NoMetadata

If you want to give specific types of metadata for specific methods but not for others, it can sometimes be useful to introduce an auxiliary closed type, so that you can give a catch-all case. For example:

type instance ResponseInitialMetadata (Protobuf Greeter meth) = GreeterResponseInitialMetadata meth

type family GreeterResponseInitialMetadata (meth :: Symbol) where
  GreeterResponseInitialMetadata "sayHelloStreamReply" = SayHelloMetadata
  GreeterResponseInitialMetadata meth                  = NoMetadata
datadata ResponseMetadata (rpc :: k)
#

Response metadata

It occassionally happens that we do not know if we should expect the initial metadata from the server or the trailing metadata (when the server uses Trailers-Only); for example, see recvResponseInitialMetadata.

Instances2Eq, Show

Serialization

classclass ParseMetadata a where
#

Parse metadata from custom metadata headers

Some guidelines for defining instances:

  • You can assume that the list of headers will not contain duplicates. The gRPC spec does allow for duplicate headers and specifies how to process them, but this will be taken care of before parseMetadata is called.

  • However, you should assume no particular order.

  • If there are unexpected headers present, you have a choice whether you want to consider this a error and throw an exception, or regard the additional headers as merely additional information and simply ignore them. There is no single right answer here: ignoring additional metadata runs the risk of not realizing that the peer is trying to tell you something important, but throwing an error runs the risk of unnecessarily aborting an RPC.

Methods

Instances1ParseMetadata
classclass BuildMetadata a => StaticMetadata a where
#

Metadata with statically known fields

This is required for the response trailing metadata. When the server sends the initial set of headers to the client, it must tell the client which trailers to expect (by means of the HTTP Trailer header; see https://datatracker.ietf.org/doc/html/rfc7230#section-4.4).

Any headers constructed in buildMetadata must be listed here; not doing so is a bug. However, the converse is not true: it is acceptable for a header to be listed in metadataHeaderNames but not in buildMetadata. Put another way: the list of "trailers to expect" included in the initial request headers is allowed to be an overapproximation, but not an underapproximation.

Instances1StaticMetadata

Configuration

1 declaration
datadata SslKeyLog
#

SSL key log file

An SSL key log file can be used by tools such as Wireshark to decode TLS network traffic. It is used for debugging only.

Constructors

Instances5Eq, Show, Generic, Default, Rep

HTTP/2 Settings

1 declaration
datadata HTTP2Settings
#

HTTP/2 settings

Constructors

  • HTTP2Settings
    • http2MaxConcurrentStreams :: Word32

      Maximum number of concurrent active streams

      https://datatracker.ietf.org/doc/html/rfc7540#section-5.1.2

    • http2StreamWindowSize :: Word32
    • http2ConnectionWindowSize :: Word32

      Connection window size

      This value is broadcast via a WINDOW_UDPATE frame at the beginning of a new connection.

      If the consumed window space of all streams exceeds this value, the sender will stop sending data. Therefore, if this value is less than http2MaxConcurrentStreams * http2StreamWindowSize, there is risk of a control flow deadlock, since the connection window space may be used up by streams that we are not yet processing before we have received all data on the streams that we are processing. To reduce this risk, increase Network.GRPC.Server.Run.serverOverrideNumberOfWorkers for the server. See https://github.com/kazu-yamamoto/network-control/pull/4 for more information.

    • http2TcpNoDelay :: Bool

      Enable TCP_NODELAY

      Send out TCP segments as soon as possible, even if there is only a small amount of data.

      When TCP_NODELAY is NOT set, the TCP implementation will wait to send a TCP segment to the receiving peer until either (1) there is enough data to fill a certain minimum segment size or (2) we receive an ACK from the receiving peer for data we sent previously. This adds a network roundtrip delay to every RPC message we want to send (to receive the ACK). If the peer uses TCP delayed acknowledgement, which will typically be the case, then this delay will increase further still; default for delayed acknowledgement is 40ms, thus resulting in a theoretical maximum of 25 RPCs/sec.

      We therefore enable TCP_NODELAY by default, so that data is sent to the peer as soon as we have an entire gRPC message serialized and ready to send (we send the data to the TCP layer only once an entire message is written, or the http2 write buffer is full).

      Turning this off could improve throughput, as fewer TCP segments will be needed, but you probably only want to do this if you send very few very large RPC messages. In gRPC this is anyway discouraged, because gRPC messages do not support incremental (de)serialization; if you need to send large amounts of data, it is preferable to split these into many, smaller, gRPC messages; this also gives the application the possibility of reporting on data transmission progress.

      TL;DR: leave this at the default unless you know what you are doing.

    • http2TcpAbortiveClose :: Bool

      Set SO_LINGER to a value of 0

      Instead of following the normal shutdown sequence to close the TCP connection, this will just send a RST packet and immediately discard the connection, freeing the local port.

      This should not be enabled in the vast majority of cases. It is only useful in specific scenarios, such as stress testing, where resource (e.g. port) exhaustion is a greater concern than protocol adherence. Even in such scenarios scenarios, it probably only makes sense to enable this option on the client since they will be using a new ephemeral port for each connection (unlike the server).

      TL;DR: leave this at the default unless you know what you are doing.

    • http2OverridePingRateLimit :: Maybe Int

      Ping rate limit

      This setting is specific to the http2 package's implementation of the HTTP/2 specification. In particular, the library imposes a ping rate limit as a security measure against CVE-2019-9512. By default (as of version 5.1.2) it sets this limit at 10 pings/second. If you find yourself being disconnected from a gRPC peer because that peer is sending too many pings (you will see an EnhanceYourCalm exception, corresponding to the ENHANCE_YOUR_CALM HTTP/2 error code), you may wish to increase this limit. If you are connecting to a peer that you trust, you can set this limit to maxBound (effectively turning off protection against ping flooding).

    • http2OverrideEmptyFrameRateLimit :: Maybe Int

      Empty DATA frame rate limit

      This setting is specific to the http2 package's implementation of the HTTP/2 specification. In particular, the library imposes a rate limit for empty DATA frames as a security measure against CVE-2019-9518. By default, it sets this limit at 4 frames/second. If you find yourself being disconnected from a gRPC peer because that peer is sending too many empty DATA frames (you will see an EnhanceYourCalm exception, corresponding to the ENHANCE_YOUR_CALM HTTP/2 error code), you may wish to increase this limit. If you are connecting to a peer that you trust, you can set this limit to maxBound (effectively turning off protection against empty DATA frame flooding).

    • http2OverrideSettingsRateLimit :: Maybe Int

      SETTINGS frame rate limit

      This setting is specific to the http2 package's implementation of the HTTP/2 specification. In particular, the library imposes a rate limit for SETTINGS frames as a security measure against CVE-2019-9515. By default, it sets this limit at 4 frames/second. If you find yourself being disconnected from a gRPC peer because that peer is sending too many SETTINGS frames (you will see an EnhanceYourCalm exception, corresponding to the ENHANCE_YOUR_CALM HTTP/2 error code), you may wish to increase this limit. If you are connecting to a peer that you trust, you can set this limit to maxBound (effectively turning off protection against SETTINGS frame flooding).

    • http2OverrideRstRateLimit :: Maybe Int

      Reset (RST) frame rate limit

      This setting is specific to the http2 package's implementation of the HTTP/2 specification. In particular, the library imposes a rate limit for RST frames as a security measure against CVE-2023-44487. By default, it sets this limit at 4 frames/second. If you find yourself being disconnected from a gRPC peer because that peer is sending too many empty RST frames (you will see an EnhanceYourCalm exception, corresponding to the ENHANCE_YOUR_CALM HTTP/2 error code), you may wish to increase this limit. If you are connecting to a peer that you trust, you can set this limit to maxBound (effectively turning off protection against RST frame flooding).

Instances2Show, Default

Defaults

3 declarations

Default port number for insecure servers

By convention, 50051 is often used as the default port for gRPC servers.

Default HTTP/2 settings

Section 6.5.2 of the HTTP/2 specification recommends that the SETTINGS_MAX_CONCURRENT_STREAMS parameter be no smaller than 100 "so as not to unnecessarily limit parallelism", so we default to 128.

The default initial stream window size (corresponding to the SETTINGS_INITIAL_WINDOW_SIZE HTTP/2 parameter) is 64KB.

The default connection window size is 128 * 64KB to avoid the control flow deadlock discussed at http2ConnectionWindowSize.

The ping rate limit imposed by the http2 package is overridden to 100 PINGs/sec.

Message metadata

2 declarations
datadata OutboundMeta
#

Meta-information for outbound messages

Constructors

Instances5Show, Generic, NFData, Default, Rep

Exceptions

0 declarations

gRPC status and exceptions

datadata GrpcStatus
#
Instances4Eq, Show, Generic, Rep
datadata GrpcError
#

gRPC error code

This is a subset of the gRPC status codes. See GrpcStatus.

Constructors

  • GrpcCancelled

    Cancelled

    The operation was cancelled, typically by the caller.

  • GrpcUnknown

    Unknown error

    For example, this error may be returned when a Status value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.

  • GrpcInvalidArgument

    Invalid argument

    The client specified an invalid argument. Note that this differs from GrpcFailedPrecondition: GrpcInvalidArgument indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).

  • GrpcDeadlineExceeded

    Deadline exceeded

    The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long.

  • GrpcNotFound

    Not found

    Some requested entity (e.g., file or directory) was not found.

    Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, GrpcNotFound may be used.

    If a request is denied for some users within a class of users, such as user-based access control, GrpcPermissionDenied must be used.

  • GrpcAlreadyExists

    Already exists

    The entity that a client attempted to create (e.g., file or directory) already exists.

  • GrpcPermissionDenied

    Permission denied

    The caller does not have permission to execute the specified operation.

    This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions.

  • GrpcResourceExhausted

    Resource exhausted

    Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

  • GrpcFailedPrecondition

    Failed precondition

    The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc.

    Service implementors can use the following guidelines to decide between GrpcFailedPrecondition, GrpcAborted, and GrpcUnavailable:

    (a) Use GrpcUnavailable if the client can retry just the failing call. (b) Use GrpcAborted if the client should retry at a higher level (e.g., when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence). (c) Use GrpcFailedPrecondition if the client should not retry until the system state has been explicitly fixed. E.g., if an rmdir fails because the directory is non-empty, GrpcFailedPrecondition should be returned since the client should not retry unless the files are deleted from the directory.

  • GrpcAborted

    Aborted

    The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between GrpcFailedPrecondition, GrpcAborted, and GrpcUnavailable.

  • GrpcOutOfRange

    Out of range

    The operation was attempted past the valid range. E.g., seeking or reading past end-of-file.

    Unlike GrpcInvalidArgument, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate GrpcInvalidArgument if asked to read at an offset that is not in the range [0, 2^32-1], but it will generate GrpcOutOfRange if asked to read from an offset past the current file size.

    There is a fair bit of overlap between GrpcFailedPrecondition and GrpcOutOfRange. We recommend using GrpcOutOfRange (the more specific error) when it applies so that callers who are iterating through a space can easily look for an GrpcOutOfRange error to detect when they are done.

  • GrpcUnimplemented

    Unimplemented

    The operation is not implemented or is not supported/enabled in this service.

  • GrpcInternal

    Internal errors

    This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors.

  • GrpcUnavailable

    Unavailable

    The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.

  • GrpcDataLoss

    Data loss

    Unrecoverable data loss or corruption.

  • GrpcUnauthenticated

    Unauthenticated

    The request does not have valid authentication credentials for the operation.

Instances6Eq, Ord, Show, Generic, Exception, Rep
datadata GrpcException
#

Server indicated a gRPC error

For the common case where you just want to set grpcError, you can use throwGrpcError.

Instances3Eq, Show, Exception

Low-level

datadata ProtocolException (rpc :: k)
#

Protocol exception

A protocol exception arises when the client and the server disagree on the sequence of inputs and outputs exchanged. This agreement might be part of a formal specification such as Protobuf, or it might be implicit in the implementation of a specific RPC.

Constructors

Instances1Show
datadata PeerException
#

Misbehaving peer

Although this exception could in principle be caught, there is not much that can be done to rectify the situation: probably this peer should just be avoided (although perhaps one can hope that the problem was transient).

Constructors

Instances2Show, Exception
newtypenewtype InvalidHeaders e
#

Invalid headers

This is used for request headers, response headers, and response trailers.

Instances6Eq, Show, Semigroup, Monoid
datadata InvalidHeader e
#

Invalid header

This corresponds to a single "raw" HTTP header. It is possible that a particular field of, say, RequestHeaders corresponds to multiple InvalidHeader, when the value of that field is determined by combining multiple HTTP headers. A special case of this is the field for unrecognized headers (see requestUnrecognized, responseUnrecognized, etc.), which collects all unrecognized headers in one field (and has value () if there are none).

For some invalid headers the gRPC spec mandates a specific HTTP status; if this status is not specified, then we use 400 Bad Request.

Constructors

Instances2Eq, Show
datadata HandledSynthesized
#

Indicate that all synthesized errors have been handled

For some headers the gRPC spec mandates a specific gRPC error that should be synthesized when the header is invalid. We use HandledSynthesized in types to indicate that all errors that should have been synthesized have already been thrown.

For example, RequestHeaders' HandledSynthesized indicates that these request headers may still contain errors for some headers, but no errors for which the spec mandates that we synthesize a specific gRPC exception.

Instances2Eq, Show

User errors

Convenience re-exports

2 declarations
datadata Proxy (t :: k)
#

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

Example1 expression
Proxy :: Proxy (Void, Int -> Int)Proxy

Proxy can even hold types of higher kinds,

Example1 expression
Proxy :: Proxy EitherProxy
Example1 expression
Proxy :: Proxy FunctorProxy
Example1 expression
Proxy :: Proxy complicatedStructureProxy
Instances75Generic1, FoldableWithIndex, FunctorWithIndex, TraversableWithIndex, RepeatWithIndex, SemialignWithIndex, …
  • Generic1 ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • FoldableWithIndex Void ProxyDefined in indexed-traversable-0.1.4 · WithIndex
  • FunctorWithIndex Void ProxyDefined in indexed-traversable-0.1.4 · WithIndex
  • TraversableWithIndex Void ProxyDefined in indexed-traversable-0.1.4 · WithIndex
  • RepeatWithIndex Void ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • SemialignWithIndex Void ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • ZipWithIndex Void ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • FilterableWithIndex Void ProxyDefined in witherable-0.5 · Witherable
  • WitherableWithIndex Void ProxyDefined in witherable-0.5 · Witherable
  • Monad ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Functor ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Applicative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Foldable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Foldable
  • Traversable ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Traversable
  • Alternative ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • MonadPlus ProxyDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • MonadZip ProxyDefined in base-4.20.2.0 · Control.Monad.Zip
  • Eq1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Ord1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Read1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Show1 ProxyDefined in base-4.20.2.0 · Data.Functor.Classes
  • Contravariant ProxyDefined in base-4.20.2.0 · Data.Functor.Contravariant
  • NFData1 ProxyDefined in deepseq-1.5.0.0 · Control.DeepSeq
  • Hashable1 ProxyDefined in hashable-1.4.7.0 · Data.Hashable.Class
  • Distributive ProxyDefined in distributive-0.6.2.1 · Data.Distributive
  • Decidable ProxyDefined in contravariant-1.5.5 · Data.Functor.Contravariant.Divisible
  • Divisible ProxyDefined in contravariant-1.5.5 · Data.Functor.Contravariant.Divisible
  • Alt ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Alt
  • Apply ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Bind.Class
  • Bind ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Bind.Class
  • Extend ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Extend
  • Conclude ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Contravariant.Conclude
  • Decide ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Contravariant.Decide
  • Divise ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Contravariant.Divise
  • Plus ProxyDefined in semigroupoids-6.0.1 · Data.Functor.Plus
  • Align ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • Semialign ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • Unalign ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • Repeat ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • Unzip ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • Zip ProxyDefined in semialign-1.3.1 · Data.Semialign.Internal
  • Filterable ProxyDefined in witherable-0.5 · Witherable
  • Witherable ProxyDefined in witherable-0.5 · Witherable
  • FromJSON1 ProxyDefined in aeson-2.2.3.0 · Data.Aeson.Types.FromJSON
  • ToJSON1 ProxyDefined in aeson-2.2.3.0 · Data.Aeson.Types.ToJSON
  • Representable ProxyDefined in adjunctions-4.4.3 · Data.Functor.Rep
  • Representable ProxyDefined in adjunctions-4.4.3 · Data.Functor.Contravariant.Rep
  • Invariant ProxyDefined in invariant-0.6.4 · Data.Functor.Invariant
  • Cosieve Tagged ProxyDefined in profunctors-5.6.3 · Data.Profunctor.Sieve
  • Bounded (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Enum (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Eq (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Data t => Data (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Read (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Show (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Ix (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Generic (Proxy t)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Semigroup (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • Monoid (Proxy s)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Proxy
  • NFData (Proxy a)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Hashable (Proxy a)Defined in hashable-1.4.7.0 · Data.Hashable.Class
  • FromJSON (Proxy a)Defined in aeson-2.2.3.0 · Data.Aeson.Types.FromJSON
  • ToJSON (Proxy a)Defined in aeson-2.2.3.0 · Data.Aeson.Types.ToJSON
  • Default (Proxy a)Defined in data-default-0.8.0.1 · Data.Default.Internal
  • MonoFoldable (Proxy a)Defined in mono-traversable-1.0.21.0 · Data.MonoTraversable
  • MonoTraversable (Proxy a)Defined in mono-traversable-1.0.21.0 · Data.MonoTraversable
  • MonoFunctor (Proxy a)Defined in mono-traversable-1.0.21.0 · Data.MonoTraversable
  • MonoPointed (Proxy a)Defined in mono-traversable-1.0.21.0 · Data.MonoTraversable
  • Serialise (Proxy a)Defined in serialise-0.2.6.1 · Codec.Serialise.Class
  • type Rep (Proxy t) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • type Rep1 Proxy = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • type Rep Proxy = VoidDefined in adjunctions-4.4.3 · Data.Functor.Rep
  • type Rep Proxy = ()Defined in adjunctions-4.4.3 · Data.Functor.Contravariant.Rep
  • type Element (Proxy a) = aDefined in mono-traversable-1.0.21.0 · Data.MonoTraversable
classclass Default a where
#

A class for types with a default value.

Methods

  • def :: a

    The default value for this type.

Instances124Default, …