-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Cap'n Proto for Haskell -- -- A native Haskell implementation of the Cap'N Proto cerialization -- format and RPC protocol. -- -- The library implements serialization and level 1 RPC. -- -- The Capnp.Tutorial module is the best place to start reading; -- the reference documentation can seem bewildering without that context. @package capnp @version 0.17.0.0 -- | This module provides misc. utilities for bitwhacking that are useful -- in dealing with low-level details of the Cap'N Proto wire format. -- -- This is mostly an implementation detail; users are unlikely to need to -- use this module directly. module Capnp.Bits -- | Wrapper type for a quantity of bits. This along with ByteCount -- and WordCount are helpful for avoiding mixing up units newtype BitCount BitCount :: Int -> BitCount -- | A quantity of bytes newtype ByteCount ByteCount :: Int -> ByteCount -- | A quantity of 64-bit words newtype WordCount WordCount :: Int -> WordCount -- | 1 bit datatype, in the tradition of Word8, Word16 et al. newtype Word1 Word1 :: Bool -> Word1 [word1ToBool] :: Word1 -> Bool -- | Convert bits to bytes. Rounds up. bitsToBytesCeil :: BitCount -> ByteCount -- | Convert bytes to words. Rounds up. bytesToWordsCeil :: ByteCount -> WordCount -- | Convert bytes to words. Rounds down. bytesToWordsFloor :: ByteCount -> WordCount -- | Convert words to bytes. wordsToBytes :: WordCount -> ByteCount -- | lo and hi extract the low and high 32 bits of a 64-bit word, -- respectively. lo :: Word64 -> Word32 -- | lo and hi extract the low and high 32 bits of a 64-bit word, -- respectively. hi :: Word64 -> Word32 -- | iN (where N is 32, 30, or 29) extracts the high N bits of its -- argument, and treats them as a signed 32-bit integer. i32 :: Word32 -> Int32 -- | iN (where N is 32, 30, or 29) extracts the high N bits of its -- argument, and treats them as a signed 32-bit integer. i30 :: Word32 -> Int32 -- | iN (where N is 32, 30, or 29) extracts the high N bits of its -- argument, and treats them as a signed 32-bit integer. i29 :: Word32 -> Int32 -- | fromLo and fromHi convert a 32-bit word to the low or high portion of -- a 64-bit word. In general, fromHi (hi w) .|. fromLo (lo w) == -- w. fromLo :: Word32 -> Word64 -- | fromLo and fromHi convert a 32-bit word to the low or high portion of -- a 64-bit word. In general, fromHi (hi w) .|. fromLo (lo w) == -- w. fromHi :: Word32 -> Word64 -- | fromIN (where N is 32, 30, or 29) treats its argument as the high N -- bits of a 32-bit word, returning the word. If w < 2 ** N -- then fromIN (iN w) == w. fromI32 :: Int32 -> Word32 -- | fromIN (where N is 32, 30, or 29) treats its argument as the high N -- bits of a 32-bit word, returning the word. If w < 2 ** N -- then fromIN (iN w) == w. fromI30 :: Int32 -> Word32 -- | fromIN (where N is 32, 30, or 29) treats its argument as the high N -- bits of a 32-bit word, returning the word. If w < 2 ** N -- then fromIN (iN w) == w. fromI29 :: Int32 -> Word32 -- | bitRange word lo hi is the unsigned integer represented by -- the bits of word in the range [lo, hi) bitRange :: Integral a => Word64 -> Int -> Int -> a -- | replaceBits new orig shift replaces the bits [shift, shift+N) -- in orig with the N bit integer new. replaceBits :: (Bounded a, Integral a) => a -> Word64 -> Int -> Word64 instance GHC.Enum.Bounded Capnp.Bits.BitCount instance GHC.Show.Show Capnp.Bits.BitCount instance GHC.Enum.Enum Capnp.Bits.BitCount instance GHC.Classes.Eq Capnp.Bits.BitCount instance GHC.Classes.Ord Capnp.Bits.BitCount instance GHC.Bits.Bits Capnp.Bits.BitCount instance GHC.Real.Integral Capnp.Bits.BitCount instance GHC.Real.Real Capnp.Bits.BitCount instance GHC.Num.Num Capnp.Bits.BitCount instance GHC.Enum.Bounded Capnp.Bits.ByteCount instance GHC.Show.Show Capnp.Bits.ByteCount instance GHC.Enum.Enum Capnp.Bits.ByteCount instance GHC.Classes.Eq Capnp.Bits.ByteCount instance GHC.Classes.Ord Capnp.Bits.ByteCount instance GHC.Bits.Bits Capnp.Bits.ByteCount instance GHC.Real.Integral Capnp.Bits.ByteCount instance GHC.Real.Real Capnp.Bits.ByteCount instance GHC.Num.Num Capnp.Bits.ByteCount instance GHC.Enum.Bounded Capnp.Bits.WordCount instance GHC.Show.Show Capnp.Bits.WordCount instance GHC.Enum.Enum Capnp.Bits.WordCount instance GHC.Classes.Eq Capnp.Bits.WordCount instance GHC.Classes.Ord Capnp.Bits.WordCount instance GHC.Bits.Bits Capnp.Bits.WordCount instance GHC.Real.Integral Capnp.Bits.WordCount instance GHC.Real.Real Capnp.Bits.WordCount instance GHC.Num.Num Capnp.Bits.WordCount instance GHC.Bits.FiniteBits Capnp.Bits.Word1 instance GHC.Bits.Bits Capnp.Bits.Word1 instance GHC.Enum.Bounded Capnp.Bits.Word1 instance GHC.Enum.Enum Capnp.Bits.Word1 instance GHC.Classes.Eq Capnp.Bits.Word1 instance GHC.Classes.Ord Capnp.Bits.Word1 instance GHC.Num.Num Capnp.Bits.Word1 instance GHC.Real.Real Capnp.Bits.Word1 instance GHC.Real.Integral Capnp.Bits.Word1 instance GHC.Show.Show Capnp.Bits.Word1 module Capnp.Errors -- | An error that may occur when processing a capnproto message. data Error -- | A BoundsError indicates an attempt to access an illegal index -- index within a sequence of length maxIndex. BoundsError :: !Int -> !Int -> Error [index] :: Error -> !Int [maxIndex] :: Error -> !Int -- | A RecursionLimitError indicates that the recursion depth limit -- was exceeded. RecursionLimitError :: Error -- | A TraversalLimitError indicates that the traversal limit was -- exceeded. TraversalLimitError :: Error -- | An InvalidDataError indicates that a part of a message being -- parsed was malformed. The argument to the data constructor is a -- human-readable error message. InvalidDataError :: String -> Error -- | A SizeError indicates that an operation would have resulted in -- a message that violated the library's limit on either segment size or -- number of segments. SizeError :: Error -- | A SchemaViolationError indicates that part of the message does -- not match the schema. The argument to the data construtor is a -- human-readable error message. SchemaViolationError :: String -> Error -- | An InvalidUtf8Error indicates that a text value in the message -- was invalid utf8. -- -- Note well: Most parts of the library don't actually check for valid -- utf8 -- don't assume the check is made unless an interface says it is. InvalidUtf8Error :: UnicodeException -> Error instance GHC.Classes.Eq Capnp.Errors.Error instance GHC.Show.Show Capnp.Errors.Error instance GHC.Exception.Type.Exception Capnp.Errors.Error -- | The Capnp.Gen module hierarchy contains code generated by the -- schema compiler. See Capnp.Tutorial for a description of what -- code is generated for each schema, as well as a general introduction -- to the library. module Capnp.Gen -- | The modules under Capnp are generated code for the schema files -- that ship with the Cap'N Proto reference implementation. module Capnp.Gen.Capnp module Capnp.Mutability -- | Mutability is used as a type parameter (with the DataKinds -- extension) to indicate the mutability of some values in this library; -- Const denotes an immutable value, while Mut s -- denotes a value that can be mutated in the scope of the state token -- s. data Mutability Const :: Mutability Mut :: Type -> Mutability -- | MaybeMutable relates mutable and immutable versions of a type. class MaybeMutable (f :: Mutability -> Type) -- | Convert an immutable value to a mutable one. thaw :: (MaybeMutable f, PrimMonad m, PrimState m ~ s) => f 'Const -> m (f ('Mut s)) -- | Convert a mutable value to an immutable one. freeze :: (MaybeMutable f, PrimMonad m, PrimState m ~ s) => f ('Mut s) -> m (f 'Const) -- | Like thaw, except that the caller is responsible for ensuring -- that the original value is not subsequently used; doing so may violate -- referential transparency. -- -- The default implementation of this is just the same as thaw, -- but typically an instance will override this with a trivial (unsafe) -- cast, hence the obligation described above. unsafeThaw :: (MaybeMutable f, PrimMonad m, PrimState m ~ s) => f 'Const -> m (f ('Mut s)) -- | Unsafe version of freeze analagous to unsafeThaw. The -- caller must ensure that the original value is not used after this -- call. unsafeFreeze :: (MaybeMutable f, PrimMonad m, PrimState m ~ s) => f ('Mut s) -> m (f 'Const) -- | Create and freeze a mutable value, safely, without doing a full copy. -- internally, create calls unsafeFreeze, but it cannot be -- directly used to violate referential transparency, as the value is not -- available to the caller after freezing. create :: MaybeMutable f => (forall s. ST s (f ('Mut s))) -> f 'Const -- | Like create, but the result is wrapped in an instance of -- Traversable. createT :: (Traversable t, MaybeMutable f) => (forall s. ST s (t (f ('Mut s)))) -> t (f 'Const) -- | This module provides support for parsing and serializing capnproto -- pointers. This is a low-level module; most users will not need to call -- it directly. module Capnp.Pointer -- | A Ptr represents the information in a capnproto pointer. data Ptr -- | StructPtr off dataSz ptrSz is a pointer to a struct at -- offset off in words from the end of the pointer, with a data -- section of size dataSz words, and a pointer section of size -- ptrSz words. -- -- Note that the value StructPtr 0 0 0 is illegal, since -- its encoding is reserved for the "null" pointer. StructPtr :: !Int32 -> !Word16 -> !Word16 -> Ptr -- | ListPtr off eltSpec is a pointer to a list starting at -- offset off in words from the end of the pointer. -- eltSpec encodes the C and D fields in the encoding spec; see -- EltSpec for details ListPtr :: !Int32 -> !EltSpec -> Ptr -- | FarPtr twoWords off segment is a far pointer, whose -- landing pad is: -- -- FarPtr :: !Bool -> !Word32 -> !Word32 -> Ptr -- | CapPtr id is a pointer to the capability with the id -- id. CapPtr :: !Word32 -> Ptr -- | The element size field in a list pointer. data ElementSize Sz0 :: ElementSize Sz1 :: ElementSize Sz8 :: ElementSize Sz16 :: ElementSize Sz32 :: ElementSize Sz64 :: ElementSize SzPtr :: ElementSize -- | A combination of the C and D fields in a list pointer, i.e. the -- element size, and either the number of elements in the list, or the -- total number of words in the list (if size is composite). data EltSpec -- | EltNormal size len is a normal (non-composite) element -- type (C /= 7). size is the size of the elements, and -- len is the number of elements in the list. EltNormal :: !ElementSize -> !Word32 -> EltSpec -- | EltComposite len is a composite element (C == 7). -- len is the length of the list in words. EltComposite :: !Int32 -> EltSpec -- | parsePtr word parses word as a capnproto pointer. A -- null pointer is parsed as Nothing. parsePtr :: Word64 -> Maybe Ptr -- | parsePtr' word parses word as a capnproto -- pointer. It ignores nulls, returning them the same as (StructPtr 0 -- 0 0). parsePtr' :: Word64 -> Ptr -- | serializePtr ptr serializes the pointer as a -- Word64, translating Nothing to a null pointer. -- -- This also changes the offset of zero-sized struct pointers to -1, to -- avoid them being interpreted as null. serializePtr :: Maybe Ptr -> Word64 -- | serializePtr' ptr serializes the pointer as a Word64. -- -- Unlike serializePtr, this results in a null pointer on the -- input (StructPtr 0 0 0), rather than adjusting the offset. serializePtr' :: Ptr -> Word64 -- | parseEltSpec word reads the EltSpec from -- word, which must be the encoding of a list pointer (this is -- not verified). parseEltSpec :: Word64 -> EltSpec -- | serializeEltSpec eltSpec serializes eltSpec -- as a Word64. all bits which are not determined by the -- EltSpec are zero. serializeEltSpec :: EltSpec -> Word64 instance GHC.Enum.Enum Capnp.Pointer.ElementSize instance GHC.Classes.Eq Capnp.Pointer.ElementSize instance GHC.Show.Show Capnp.Pointer.ElementSize instance GHC.Classes.Eq Capnp.Pointer.EltSpec instance GHC.Show.Show Capnp.Pointer.EltSpec instance GHC.Classes.Eq Capnp.Pointer.Ptr instance GHC.Show.Show Capnp.Pointer.Ptr -- | This module provides facilities for manipulating raw addresses within -- Cap'N Proto messages. -- -- This is a low level module that very few users will need to use -- directly. module Capnp.Address -- | The address of a word within a message data WordAddr WordAt :: !Int -> !WordCount -> WordAddr -- | Segment number [segIndex] :: WordAddr -> !Int -- | offset in words from the start of the segment. [wordIndex] :: WordAddr -> !WordCount -- | The "address" of a capability newtype CapAddr Cap :: Word32 -> CapAddr -- | An address, i.e. a location that a pointer may point at. data Addr -- | The address of some data in the message. WordAddr :: !WordAddr -> Addr -- | The "address" of a capability. CapAddr :: !CapAddr -> Addr -- | An error returned by computeOffset; this describes the reason -- why a value cannot be directly addressed from a given location. data OffsetError -- | The pointer and the value are in different segments. DifferentSegments :: OffsetError -- | The pointer is in the correct segment, but too far away to encode the -- offset. (more than 30 bits would be required). This can only happen -- with segments that are > 8 GiB, which this library refuses to -- either decode or generate, so this should not come up in practice. OutOfRange :: OffsetError -- | computeOffset ptrAddr valueAddr computes the offset -- that should be stored in a struct or list pointer located at -- ptrAddr, in order to point at a value located at -- valueAddr. If the value cannot be directly addressed by a -- pointer at ptrAddr, then this returns Left, with the -- OffsetError describing the problem. computeOffset :: WordAddr -> WordAddr -> Either OffsetError WordCount -- | pointerFrom ptrAddr targetAddr ptr updates -- ptr, such that it is correct to target a value located at -- targetAddr given that the pointer itself is located at -- ptrAddr. Returns Left if this is not possible. -- -- It is illegal to call this on a capability pointer. -- -- For far pointers, targetAddr is taken to be the address of -- the landing pad, rather than the final value. pointerFrom :: WordAddr -> WordAddr -> Ptr -> Either OffsetError Ptr -- | Add an offset to a WordAddr. resolveOffset :: WordAddr -> Int32 -> WordAddr instance GHC.Classes.Eq Capnp.Address.WordAddr instance GHC.Show.Show Capnp.Address.WordAddr instance GHC.Classes.Eq Capnp.Address.CapAddr instance GHC.Show.Show Capnp.Address.CapAddr instance GHC.Classes.Eq Capnp.Address.Addr instance GHC.Show.Show Capnp.Address.Addr -- | This module is used to mitigate several pitfalls with the capnproto -- format, which could potentially lead to denial of service -- vulnerabilities. -- -- In particular, while they are illegal according to the spec, it is -- possible to encode objects which have many pointers pointing the same -- place, or even cycles. A naive traversal therefore could involve quite -- a lot of computation for a message that is very small on the wire. -- -- Accordingly, most implementations of the format keep track of how many -- bytes of a message have been accessed, and start signaling errors -- after a certain value (the "traversal limit") has been reached. The -- Haskell implementation is no exception; this module implements that -- logic. We provide a monad transformer and mtl-style type class to -- track the limit; reading from the message happens inside of this -- monad. module Capnp.TraversalLimit -- | mtl-style type class to track the traversal limit. This is used by -- other parts of the library which actually do the reading. class Monad m => MonadLimit m -- | invoice n deducts n from the traversal limit, -- signaling an error if the limit is exhausted. invoice :: MonadLimit m => WordCount -> m () -- | Monad transformer implementing MonadLimit. The underlying monad -- must implement MonadThrow. invoice calls -- throwM TraversalLimitError when the limit is -- exhausted. data LimitT m a -- | Run a LimitT, returning the value from the computation and the -- remaining traversal limit. runLimitT :: MonadThrow m => WordCount -> LimitT m a -> m (a, WordCount) -- | Run a LimitT, returning the value from the computation. evalLimitT :: MonadThrow m => WordCount -> LimitT m a -> m a -- | Run a LimitT, returning the remaining traversal limit. execLimitT :: MonadThrow m => WordCount -> LimitT m a -> m WordCount -- | A sensible default traversal limit. Currently 64 MiB. defaultLimit :: WordCount instance GHC.Base.Monad m => GHC.Base.Monad (Capnp.TraversalLimit.LimitT m) instance GHC.Base.Monad m => GHC.Base.Applicative (Capnp.TraversalLimit.LimitT m) instance GHC.Base.Functor m => GHC.Base.Functor (Capnp.TraversalLimit.LimitT m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Capnp.TraversalLimit.LimitT m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Capnp.TraversalLimit.LimitT m) instance Control.Monad.Catch.MonadThrow m => Capnp.TraversalLimit.MonadLimit (Capnp.TraversalLimit.LimitT m) instance Control.Monad.Trans.Class.MonadTrans Capnp.TraversalLimit.LimitT instance Control.Monad.State.Class.MonadState s m => Control.Monad.State.Class.MonadState s (Capnp.TraversalLimit.LimitT m) instance (Control.Monad.Primitive.PrimMonad m, s GHC.Types.~ Control.Monad.Primitive.PrimState m) => Control.Monad.Primitive.PrimMonad (Capnp.TraversalLimit.LimitT m) instance Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (Capnp.TraversalLimit.LimitT m) instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Capnp.TraversalLimit.LimitT m) instance Capnp.TraversalLimit.MonadLimit m => Capnp.TraversalLimit.MonadLimit (Control.Monad.Trans.State.Strict.StateT s m) instance Capnp.TraversalLimit.MonadLimit m => Capnp.TraversalLimit.MonadLimit (Control.Monad.Trans.State.Lazy.StateT s m) instance (GHC.Base.Monoid w, Capnp.TraversalLimit.MonadLimit m) => Capnp.TraversalLimit.MonadLimit (Control.Monad.Trans.Writer.Lazy.WriterT w m) instance Capnp.TraversalLimit.MonadLimit m => Capnp.TraversalLimit.MonadLimit (Control.Monad.Trans.Reader.ReaderT r m) instance (GHC.Base.Monoid w, Capnp.TraversalLimit.MonadLimit m) => Capnp.TraversalLimit.MonadLimit (Control.Monad.Trans.RWS.Lazy.RWST r w s m) -- | This module provides a tutorial on the overall usage of the library. -- Note that it does not aim to provide a thorough introduction to -- capnproto itself; see https://capnproto.org for general -- information. -- -- Each of the example programs described here can also be found in the -- examples/ subdirectory in the source repository. module Capnp.Tutorial -- | There is a common pattern in Haskell libraries that work with mutable -- data: -- -- -- -- This module abstracts out the above pattern into a generic type family -- Thaw, and provides some of the common higher-level tools built -- on top of these primitives. -- -- Note that there's nothing terribly Cap'N Proto specific about this -- module; we may even factor it out into a separate package at some -- point. -- | Deprecated: use Capnp.Mutability instead module Data.Mutable -- | The Thaw type class relates mutable and immutable versions of a -- type. The instance is defined on the immutable variant; -- Mutable s a is the mutable version of an immutable -- type a, bound to the state token s. class Thaw a where { -- | The mutable version of a, bound to the state token -- s. type Mutable s a; } -- | Convert an immutable value to a mutable one. thaw :: (Thaw a, PrimMonad m, PrimState m ~ s) => a -> m (Mutable s a) -- | Convert a mutable value to an immutable one. freeze :: (Thaw a, PrimMonad m, PrimState m ~ s) => Mutable s a -> m a -- | Like thaw, except that the caller is responsible for ensuring -- that the original value is not subsequently used; doing so may violate -- referential transparency. -- -- The default implementation of this is just the same as thaw, -- but typically an instance will override this with a trivial (unsafe) -- cast, hence the obligation described above. unsafeThaw :: (Thaw a, PrimMonad m, PrimState m ~ s) => a -> m (Mutable s a) -- | Unsafe version of freeze analagous to unsafeThaw. The -- caller must ensure that the original value is not used after this -- call. unsafeFreeze :: (Thaw a, PrimMonad m, PrimState m ~ s) => Mutable s a -> m a -- | Create and freeze a mutable value, safely, without doing a full copy. -- internally, create calls unsafeFreeze, but it cannot be -- directly used to violate referential transparency, as the value is not -- available to the caller after freezing. create :: Thaw a => (forall s. ST s (Mutable s a)) -> a -- | Like create, but the result is wrapped in an instance of -- Traversable. createT :: (Traversable f, Thaw a) => (forall s. ST s (f (Mutable s a))) -> f a module Capnp.Rpc.Common newtype Client a Client :: Client -> Client a -- | A Pipeline a is a reference to possibly-not-resolved -- result from a method call. newtype Pipeline a Pipeline :: Pipeline -> Pipeline a instance GHC.Classes.Eq (Capnp.Rpc.Common.Client a) instance GHC.Show.Show (Capnp.Rpc.Common.Client a) -- | This module provides support for working directly with Cap'N Proto -- messages. module Capnp.Message -- | A Cap'n Proto message, parametrized over its mutability. data family Message (mut :: Mutability) -- | A segment in a Cap'n Proto message. data family Segment (mut :: Mutability) -- | Mutability is used as a type parameter (with the DataKinds -- extension) to indicate the mutability of some values in this library; -- Const denotes an immutable value, while Mut s -- denotes a value that can be mutated in the scope of the state token -- s. data Mutability Const :: Mutability Mut :: Type -> Mutability -- | hPutMsg handle msg writes msg to -- handle. If there is an exception, it will be an -- IOError raised by the underlying IO libraries. hPutMsg :: Handle -> Message 'Const -> IO () -- | hGetMsg handle limit reads a message from -- handle that is at most limit 64-bit words in length. hGetMsg :: Handle -> WordCount -> IO (Message 'Const) -- | Equivalent to hPutMsg stdout putMsg :: Message 'Const -> IO () -- | Equivalent to hGetMsg stdin getMsg :: WordCount -> IO (Message 'Const) -- | readMessage read32 readSegment reads in a message -- using the monadic context, which should manage the current read -- position, into a message. read32 should read a 32-bit little-endian -- integer, and readSegment n should read a blob of n -- 64-bit words. The size of the message (in 64-bit words) is deducted -- from the traversal, limit which can be used to set the maximum message -- size. readMessage :: (MonadThrow m, MonadLimit m) => m Word32 -> (WordCount -> m (Segment 'Const)) -> m (Message 'Const) -- | writeMesage write32 writeSegment writes out the -- message. write32 should write a 32-bit word in little-endian -- format to the output stream. writeSegment should write a -- blob. writeMessage :: MonadThrow m => Message 'Const -> (Word32 -> m ()) -> (Segment 'Const -> m ()) -> m () -- | The maximum size of a segment supported by this libarary, in words. maxSegmentSize :: WordCount -- | The maximum number of segments allowed in a message by this library. maxSegments :: Int -- | The maximum number of capabilities allowed in a message by this -- library. maxCaps :: Int -- | encode encodes a message as a bytestring builder. encode :: Message 'Const -> Builder -- | decode decodes a message from a bytestring. -- -- The segments will not be copied; the resulting message will be a view -- into the original bytestring. Runs in O(number of segments in the -- message). decode :: MonadThrow m => ByteString -> m (Message 'Const) -- | Convert a segment to a byte string. O(1) toByteString :: Segment 'Const -> ByteString -- | Convert a ByteString to a segment. O(1) fromByteString :: ByteString -> Segment 'Const -- | Return the underlying storage of a mutable segment, as a vector. -- -- Note that the elements of the vector will be stored in little-endian -- form, regardless of CPU endianness. This is a low level function that -- you should probably not use. segToVecMut :: (PrimMonad m, PrimState m ~ s) => Segment ('Mut s) -> m (MVector s Word64) -- | empty is an empty message, i.e. a minimal message with a null -- pointer as its root object. empty :: Message 'Const -- | Create a message from a single segment. singleSegment :: Segment 'Const -> Message 'Const -- | A Message is a (possibly read-only) capnproto message. It is -- parameterized over a monad in which operations are performed. class Monad m => MonadReadMessage mut m -- | numSegs gets the number of segments in a message. numSegs :: MonadReadMessage mut m => Message mut -> m Int -- | numWords gets the number of words in a segment. numWords :: MonadReadMessage mut m => Segment mut -> m WordCount -- | numCaps gets the number of capabilities in a message's -- capability table. numCaps :: MonadReadMessage mut m => Message mut -> m Int -- | getSegment message index gets the segment at index -- index in message. getSegment :: MonadReadMessage mut m => Message mut -> Int -> m (Segment mut) -- | internalGetCap cap index reads a capability from the -- message's capability table, returning the client. does not check -- bounds. Callers should use getCap instead. internalGetCap :: MonadReadMessage mut m => Message mut -> Int -> m Client -- | slice start length segment extracts a sub-section of -- the segment, starting at index start, of length -- length. slice :: MonadReadMessage mut m => WordCount -> WordCount -> Segment mut -> m (Segment mut) -- | read segment index reads a 64-bit word from the -- segement at the given index. Consider using getWord on the -- message, instead of calling this directly. read :: MonadReadMessage mut m => Segment mut -> WordCount -> m Word64 -- | getCap message index gets the capability with the -- given index from the message. throws BoundsError if the index -- is out of bounds. getCap :: (MonadThrow m, MonadReadMessage mut m) => Message mut -> Int -> m Client -- | getCapTable gets the capability table from a ConstMsg. getCapTable :: Message 'Const -> Vector Client -- | getWord gets the word referred to by the WordPtr getWord :: MonadReadMessage mut m => WordPtr mut -> m Word64 -- | Return the total number of words in the message, i.e. the sum of the -- results of numWords on all segments. totalNumWords :: MonadReadMessage mut m => Message mut -> m WordCount -- | newMessage sizeHint allocates a new empty message, -- with a single segment having capacity sizeHint. If -- sizeHint is Nothing, defaults to a sensible value. newMessage :: WriteCtx m s => Maybe WordCount -> m (Message ('Mut s)) -- | A pointer to a location in a message. This encodes the same -- information as a WordAddr, but also includes direct references -- to the segment and message, which can improve performance in very -- low-level code. data WordPtr mut WordPtr :: !Message mut -> !Segment mut -> {-# UNPACK #-} !WordAddr -> WordPtr mut [pMessage] :: WordPtr mut -> !Message mut [pSegment] :: WordPtr mut -> !Segment mut [pAddr] :: WordPtr mut -> {-# UNPACK #-} !WordAddr -- | alloc size allocates size words within a -- message. it returns the starting address of the allocated memory, as -- well as a direct reference to the segment. The latter is redundant -- information, but this is used in low-level code where this can improve -- performance. alloc :: WriteCtx m s => Message ('Mut s) -> WordCount -> m (WordPtr ('Mut s)) -- | Like alloc, but the second argument allows the caller to -- specify the index of the segment in which to allocate the data. -- Returns Nothing if there is insufficient space in that -- segment.. allocInSeg :: WriteCtx m s => Message ('Mut s) -> Int -> WordCount -> m (Maybe (WordPtr ('Mut s))) -- | newSegment msg sizeHint allocates a new, initially -- empty segment in msg with a capacity of sizeHint -- words. It returns the a pair of the segment number and the segment -- itself. Amortized O(1). newSegment :: WriteCtx m s => Message ('Mut s) -> WordCount -> m (Int, Segment ('Mut s)) -- | setSegment message index segment sets the segment at -- the given index in the message. setSegment :: WriteCtx m s => Message ('Mut s) -> Int -> Segment ('Mut s) -> m () -- | write segment index value writes a value to the 64-bit -- word at the provided index. Consider using setWord on the -- message, instead of calling this directly. write :: WriteCtx m s => Segment ('Mut s) -> WordCount -> Word64 -> m () -- | setCap message index cap sets the sets the capability -- at index in the message's capability table to cap. -- If the index is out of bounds, a BoundsError will be thrown. setCap :: WriteCtx m s => Message ('Mut s) -> Int -> Client -> m () -- | appendCap appends a new capabilty to the end of a message's -- capability table, returning its index. appendCap :: WriteCtx m s => Message ('Mut s) -> Client -> m Int -- | WriteCtx is the context needed for most write operations. type WriteCtx m s = (PrimMonad m, s ~ PrimState m, MonadThrow m) -- | A reference to a capability, which may be live either in the current -- vat or elsewhere. Holding a client affords making method calls on a -- capability or modifying the local vat's reference count to it. data Client -- | A null client. This is the only client value that can be represented -- statically. Throws exceptions in response to all method calls. nullClient :: Client -- | withCapTable replaces the capability table in the -- message. withCapTable :: Vector Client -> Message 'Const -> Message 'Const instance GHC.Classes.Eq (Capnp.Message.Segment ('Capnp.Mutability.Mut s)) instance GHC.Classes.Eq Capnp.Message.ConstSegment instance GHC.Classes.Eq (Capnp.Message.Segment 'Capnp.Mutability.Const) instance GHC.Classes.Eq Capnp.Message.ConstMsg instance GHC.Classes.Eq (Capnp.Message.Message 'Capnp.Mutability.Const) instance GHC.Classes.Eq (Capnp.Message.MutMsg s) instance GHC.Classes.Eq (Capnp.Message.Message ('Capnp.Mutability.Mut s)) instance (Control.Monad.Primitive.PrimMonad m, s GHC.Types.~ Control.Monad.Primitive.PrimState m) => Capnp.Message.MonadReadMessage ('Capnp.Mutability.Mut s) m instance GHC.Base.Monad m => Capnp.Message.MonadReadMessage 'Capnp.Mutability.Const m instance GHC.Classes.Eq (Capnp.Message.MutSegment s) instance Capnp.Mutability.MaybeMutable Capnp.Message.Segment instance Capnp.Mutability.MaybeMutable Capnp.Message.Message -- | The types and functions in this module know about things like structs -- and lists, but are not schema aware. -- -- Each of the data types exported by this module is parametrized over -- the mutability of the message it contains (see Capnp.Message). module Capnp.Untyped -- | A Repr describes a wire representation for a value. This is -- mostly used at the type level (using DataKinds); types are -- parametrized over representations. data Repr -- | Pointer type. Nothing indicates an AnyPointer, Just -- describes a more specific pointer type. Ptr :: Maybe PtrRepr -> Repr -- | Non-pointer type. Data :: DataSz -> Repr -- | Information about the representation of a pointer type data PtrRepr -- | Capability pointer. Cap :: PtrRepr -- | List pointer. Nothing describes an AnyList, Just -- describes more specific list types. List :: Maybe ListRepr -> PtrRepr -- | A struct (or group). Struct :: PtrRepr -- | Information about the representation of a list type. data ListRepr -- | A "normal" list [ListNormal] :: NormalListRepr -> ListRepr -- | A composite (struct) list [ListComposite] :: ListRepr -- | Information about the representation of a normal (non-composite) list. data NormalListRepr [NormalListData] :: DataSz -> NormalListRepr [NormalListPtr] :: NormalListRepr -- | The size of a non-pointer type. SzN represents an -- N-bit value. data DataSz Sz0 :: DataSz Sz1 :: DataSz Sz8 :: DataSz Sz16 :: DataSz Sz32 :: DataSz Sz64 :: DataSz -- | Untyped r mut is an untyped value with representation -- r stored in a message with mutability mut. -- -- Note that the return type of this type family has kind -- Mutability -> Type. This is important, as it -- allows us to define instances on Untyped r, and use -- Untyped r in constraints. -- -- This introduces some awkwardnesses though -- we really want this to be -- (Maybe (Ptr mut)) for 'Ptr 'Nothing, and Int -- typesBool() for 'Data sz. But we can't because these -- are the wrong kind. -- -- So, we hack around this by introducing two newtypes, IgnoreMut -- and MaybePtr, and a type family Unwrapped, which lets us -- use Unwrapped (Untyped r mut) as the type we -- really want in some places, though we can't curry it then. -- -- All this is super super awkward, but this is a low level -- mostly-internal API; most users will intract with this through the Raw -- type in Capnp.Repr, which hides all of this... type family Untyped (r :: Repr) :: Mutability -> Type -- | UntypedData sz is an untyped value with size sz. type family UntypedData (sz :: DataSz) :: Type -- | Like Untyped, but for pointers only. type family UntypedPtr (r :: Maybe PtrRepr) :: Mutability -> Type -- | Like UntypedPtr, but doesn't allow AnyPointers. type family UntypedSomePtr (r :: PtrRepr) :: Mutability -> Type -- | Like Untyped, but for lists only. type family UntypedList (r :: Maybe ListRepr) :: Mutability -> Type -- | Like UntypedList, but doesn't allow AnyLists. type family UntypedSomeList (r :: ListRepr) :: Mutability -> Type -- | Wrapper for use with Untyped; see docs for Untyped newtype IgnoreMut a (mut :: Mutability) IgnoreMut :: a -> IgnoreMut a (mut :: Mutability) -- | Wrapper for use with Untyped; see docs for Untyped. newtype MaybePtr (mut :: Mutability) MaybePtr :: Maybe (Ptr mut) -> MaybePtr (mut :: Mutability) -- | Normalizes types returned by Untyped; see docs for -- Untyped. type family Unwrapped a -- | Element supports converting between values of representation -- ElemRepr (ListReprFor r) and values of -- representation r. -- -- At a glance, you might expect this to just be a no-op, but it is -- actually *not* always the case that ElemRepr -- (ListReprFor r) ~ r; in the case of pointer types, -- ListReprFor r can contain arbitrary pointers, so -- information is lost, and it is possible for the list to contain -- pointers of the incorrect type. In this case, fromElement will -- throw an error. -- -- toElement is more trivial. class Element (r :: Repr) fromElement :: forall m mut. (Element r, ReadCtx m mut) => Message mut -> Unwrapped (Untyped (ElemRepr (ListReprFor r)) mut) -> m (Unwrapped (Untyped r mut)) toElement :: Element r => Unwrapped (Untyped r mut) -> Unwrapped (Untyped (ElemRepr (ListReprFor r)) mut) -- | ListItem r indicates that r is a -- representation for elements of some list type. Not every -- representation is covered; instances exist only for r where -- ElemRepr (ListReprFor r) ~ r. class Element r => ListItem (r :: Repr) -- | Returns the length of a list length :: ListItem r => ListOf r mut -> Int unsafeIndex :: (ListItem r, ReadCtx m mut) => Int -> ListOf r mut -> m (Unwrapped (Untyped r mut)) unsafeSetIndex :: (ListItem r, RWCtx m s, a ~ Unwrapped (Untyped r ('Mut s))) => a -> Int -> ListOf r ('Mut s) -> m () unsafeTake :: ListItem r => Int -> ListOf r mut -> ListOf r mut checkListOf :: (ListItem r, ReadCtx m mut) => ListOf r mut -> m () -- | Make a copy of the list, in the target message. copyListOf :: (ListItem r, RWCtx m s) => ListOf r ('Mut s) -> ListOf r ('Mut s) -> m () -- | Returns the length of a list length :: (ListItem r, ListRepOf r ~ NormalList) => ListOf r mut -> Int unsafeIndex :: forall m mut. (ListItem r, ReadCtx m mut, Integral (Unwrapped (Untyped r mut)), ListRepOf r ~ NormalList, FiniteBits (Unwrapped (Untyped r mut))) => Int -> ListOf r mut -> m (Unwrapped (Untyped r mut)) unsafeSetIndex :: forall m s a. (ListItem r, RWCtx m s, a ~ Unwrapped (Untyped r ('Mut s)), ListRepOf r ~ NormalList, Integral a, Bounded a, FiniteBits a) => a -> Int -> ListOf r ('Mut s) -> m () unsafeTake :: (ListItem r, ListRepOf r ~ NormalList) => Int -> ListOf r mut -> ListOf r mut checkListOf :: forall m mut. (ListItem r, ReadCtx m mut, ListRepOf r ~ NormalList, FiniteBits (Untyped r mut)) => ListOf r mut -> m () -- | ElemRepr r is the representation of elements of lists with -- representation r. type family ElemRepr (rl :: ListRepr) :: Repr -- | ListReprFor e is the representation of lists with elements -- whose representation is e. type family ListReprFor (e :: Repr) :: ListRepr -- | Operations on types with pointer representations. class IsPtrRepr (r :: Maybe PtrRepr) -- | Convert an untyped value of this representation to an AnyPointer. toPtr :: IsPtrRepr r => Unwrapped (Untyped ('Ptr r) mut) -> Maybe (Ptr mut) -- | Extract a value with this representation from an AnyPointer, failing -- if the pointer is the wrong type for this representation. fromPtr :: (IsPtrRepr r, ReadCtx m mut) => Message mut -> Maybe (Ptr mut) -> m (Unwrapped (Untyped ('Ptr r) mut)) -- | Operations on types with list representations. class IsListPtrRepr (r :: ListRepr) -- | Convert an untyped value of this representation to an AnyList. rToList :: IsListPtrRepr r => UntypedSomeList r mut -> List mut -- | Extract a value with this representation from an AnyList, failing if -- the list is the wrong type for this representation. rFromList :: (IsListPtrRepr r, ReadCtx m mut) => List mut -> m (UntypedSomeList r mut) -- | Create a zero-length value with this representation, living in the -- provided message. rFromListMsg :: (IsListPtrRepr r, ReadCtx m mut) => Message mut -> m (UntypedSomeList r mut) -- | An instace of Allocate specifies how to allocate a -- value with a given representation. This only makes sense for pointers -- of course, so it is defined on PtrRepr. Of the well-kinded types, only -- 'List 'Nothing is missing an instance. class Allocate (r :: PtrRepr) where { -- | Extra information needed to allocate a value: -- -- type AllocHint r; } -- | Allocate a value of the given type. alloc :: (Allocate r, RWCtx m s) => Message ('Mut s) -> AllocHint r -> m (Unwrapped (UntypedSomePtr r ('Mut s))) -- | Like Allocate, but specialized to normal (non-composite) lists. -- -- Instead of an AllocHint type family, the hint is always an -- Int, which is the number of elements. class AllocateNormalList (r :: NormalListRepr) allocNormalList :: (AllocateNormalList r, RWCtx m s) => Message ('Mut s) -> Int -> m (UntypedSomeList ('ListNormal r) ('Mut s)) -- | A an absolute pointer to a value (of arbitrary type) in a message. -- Note that there is no variant for far pointers, which don't make sense -- with absolute addressing. data Ptr mut PtrCap :: Cap mut -> Ptr mut PtrList :: List mut -> Ptr mut PtrStruct :: Struct mut -> Ptr mut -- | A list of values (of arbitrary type) in a message. data List mut List0 :: ListOf ('Data 'Sz0) mut -> List mut List1 :: ListOf ('Data 'Sz1) mut -> List mut List8 :: ListOf ('Data 'Sz8) mut -> List mut List16 :: ListOf ('Data 'Sz16) mut -> List mut List32 :: ListOf ('Data 'Sz32) mut -> List mut List64 :: ListOf ('Data 'Sz64) mut -> List mut ListPtr :: ListOf ('Ptr 'Nothing) mut -> List mut ListStruct :: ListOf ('Ptr ('Just 'Struct)) mut -> List mut -- | A struct value in a message. data Struct mut -- | A list of values with representation r in a message. data ListOf r mut -- | A Capability in a message. data Cap mut -- | Get the size (in bytes) of a struct's data section. structByteCount :: Struct mut -> ByteCount -- | Get the size (in words) of a struct's data section. structWordCount :: Struct mut -> WordCount -- | Get the size of a struct's pointer section. structPtrCount :: Struct mut -> Word16 -- | Get the size (in words) of the data sections in a struct list. structListByteCount :: ListOf ('Ptr ('Just 'Struct)) mut -> ByteCount -- | Get the size (in words) of the data sections in a struct list. structListWordCount :: ListOf ('Ptr ('Just 'Struct)) mut -> WordCount -- | Get the size of the pointer sections in a struct list. structListPtrCount :: ListOf ('Ptr ('Just 'Struct)) mut -> Word16 -- | getData i struct gets the ith word from the -- struct's data section, returning 0 if it is absent. getData :: ReadCtx m msg => Int -> Struct msg -> m Word64 -- | getPtr i struct gets the ith word from the -- struct's pointer section, returning Nothing if it is absent. getPtr :: ReadCtx m msg => Int -> Struct msg -> m (Maybe (Ptr msg)) -- | setData value i struct sets the ith word in -- the struct's data section to value. setData :: (ReadCtx m ('Mut s), WriteCtx m s) => Word64 -> Int -> Struct ('Mut s) -> m () -- | setData value i struct sets the ith pointer -- in the struct's pointer section to value. setPtr :: (ReadCtx m ('Mut s), WriteCtx m s) => Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m () -- | copyStruct dest src copies the source struct to the -- destination struct. copyStruct :: RWCtx m s => Struct ('Mut s) -> Struct ('Mut s) -> m () -- | Make a copy of the value at the pointer, in the target message. copyPtr :: RWCtx m s => Message ('Mut s) -> Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s))) -- | Make a copy of the list, in the target message. copyList :: RWCtx m s => Message ('Mut s) -> List ('Mut s) -> m (List ('Mut s)) -- | Make a copy of a capability inside the target message. copyCap :: RWCtx m s => Message ('Mut s) -> Cap ('Mut s) -> m (Cap ('Mut s)) -- | Extract a client (indepedent of the messsage) from the capability. getClient :: ReadCtx m mut => Cap mut -> m Client -- | get ptr returns the Ptr stored at ptr. Deducts 1 -- from the quota for each word read (which may be multiple in the case -- of far pointers). get :: ReadCtx m mut => WordPtr mut -> m (Maybe (Ptr mut)) -- | index i list returns the ith element in list. -- Deducts 1 from the quota index :: (ReadCtx m mut, ListItem r) => Int -> ListOf r mut -> m (Unwrapped (Untyped r mut)) -- | 'setIndex value i list Set the ith element of -- list to value. setIndex :: (RWCtx m s, ListItem r) => Unwrapped (Untyped r ('Mut s)) -> Int -> ListOf r ('Mut s) -> m () -- | Return a prefix of the list, of the given length. take :: (ListItem r, MonadThrow m) => Int -> ListOf r mut -> m (ListOf r mut) -- | Returns the root pointer of a message. rootPtr :: ReadCtx m mut => Message mut -> m (Struct mut) -- | Make the given struct the root object of its message. setRoot :: WriteCtx m s => Struct ('Mut s) -> m () -- | rawBytes returns the raw bytes corresponding to the list. rawBytes :: ReadCtx m 'Const => ListOf ('Data 'Sz8) 'Const -> m ByteString -- | Type (constraint) synonym for the constraints needed for most read -- operations. type ReadCtx m mut = (MonadReadMessage mut m, MonadThrow m, MonadLimit m) -- | Synonym for ReadCtx + WriteCtx type RWCtx m s = (ReadCtx m ('Mut s), WriteCtx m s) -- | Types whose storage is owned by a message.. class HasMessage (f :: Mutability -> Type) -- | Get the message in which the value is stored. message :: HasMessage f => Unwrapped (f mut) -> Message mut -- | Types which have a "default" value, but require a message to construct -- it. -- -- The default is usually conceptually zero-size. This is mostly useful -- for generated code, so that it can use standard decoding techniques on -- default values. class HasMessage f => MessageDefault f messageDefault :: (MessageDefault f, ReadCtx m mut) => Message mut -> m (Unwrapped (f mut)) -- | Allocate a struct in the message. allocStruct :: WriteCtx m s => Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s)) -- | Allocate a composite list. allocCompositeList :: WriteCtx m s => Message ('Mut s) -> Word16 -> Word16 -> Int -> m (ListOf ('Ptr ('Just 'Struct)) ('Mut s)) -- | Allocate a list of capnproto Void values. allocList0 :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Data 'Sz0) ('Mut s)) -- | Allocate a list of booleans allocList1 :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Data 'Sz1) ('Mut s)) -- | Allocate a list of 8-bit values. allocList8 :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Data 'Sz8) ('Mut s)) -- | Allocate a list of 16-bit values. allocList16 :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Data 'Sz16) ('Mut s)) -- | Allocate a list of 32-bit values. allocList32 :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Data 'Sz32) ('Mut s)) -- | Allocate a list of 64-bit words. allocList64 :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Data 'Sz64) ('Mut s)) -- | Allocate a list of pointers. allocListPtr :: WriteCtx m s => Message ('Mut s) -> Int -> m (ListOf ('Ptr 'Nothing) ('Mut s)) appendCap :: WriteCtx m s => Message ('Mut s) -> Client -> m (Cap ('Mut s)) -- | N.B. this should mostly be considered an implementation detail, but it -- is exposed because it is used by generated code. -- -- TraverseMsg is similar to Traversable from the prelude, -- but the intent is that rather than conceptually being a "container", -- the instance is a value backed by a message, and the point of the type -- class is to be able to apply transformations to the underlying -- message. -- -- We don't just use Traversable for this for two reasons: -- --
    --
  1. While algebraically it makes sense, it would be very unintuitive -- to e.g. have the Traversable instance for List not -- traverse over the *elements* of the list.
  2. --
  3. For the instance for WordPtr, we actually need a stronger -- constraint than Applicative in order for the implementation to type -- check. A previous version of the library *did* have tMsg :: -- Applicative m => ..., but performance considerations -- eventually forced us to open up the hood a bit.
  4. --
class TraverseMsg f tMsg :: (TraverseMsg f, TraverseMsgCtx m mutA mutB) => (Message mutA -> m (Message mutB)) -> f mutA -> m (f mutB) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz0)) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz1)) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz8)) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz16)) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz32)) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz64)) instance Capnp.Untyped.IsListPtrRepr ('Capnp.Untyped.ListNormal 'Capnp.Untyped.NormalListPtr) instance Capnp.Untyped.IsListPtrRepr 'Capnp.Untyped.ListComposite instance Capnp.Mutability.MaybeMutable (Capnp.Untyped.IgnoreMut a) instance Capnp.Mutability.MaybeMutable Capnp.Untyped.MaybePtr instance Capnp.Mutability.MaybeMutable Capnp.Untyped.Ptr instance Capnp.Mutability.MaybeMutable Capnp.Untyped.List instance Capnp.Mutability.MaybeMutable Capnp.Untyped.Cap instance Capnp.Mutability.MaybeMutable Capnp.Untyped.Struct instance Capnp.Mutability.MaybeMutable Capnp.Untyped.NormalList instance Capnp.Mutability.MaybeMutable Capnp.Untyped.StructList instance GHC.Show.Show Capnp.Untyped.DataSz instance GHC.Show.Show Capnp.Untyped.NormalListRepr instance GHC.Show.Show Capnp.Untyped.ListRepr instance GHC.Show.Show Capnp.Untyped.PtrRepr instance GHC.Show.Show Capnp.Untyped.Repr instance GHC.Bits.FiniteBits a => GHC.Bits.FiniteBits (Capnp.Untyped.IgnoreMut a mut) instance GHC.Bits.Bits a => GHC.Bits.Bits (Capnp.Untyped.IgnoreMut a mut) instance GHC.Real.Integral a => GHC.Real.Integral (Capnp.Untyped.IgnoreMut a mut) instance GHC.Real.Real a => GHC.Real.Real (Capnp.Untyped.IgnoreMut a mut) instance GHC.Num.Num a => GHC.Num.Num (Capnp.Untyped.IgnoreMut a mut) instance GHC.Enum.Bounded a => GHC.Enum.Bounded (Capnp.Untyped.IgnoreMut a mut) instance GHC.Enum.Enum a => GHC.Enum.Enum (Capnp.Untyped.IgnoreMut a mut) instance GHC.Classes.Ord a => GHC.Classes.Ord (Capnp.Untyped.IgnoreMut a mut) instance GHC.Classes.Eq a => GHC.Classes.Eq (Capnp.Untyped.IgnoreMut a mut) instance GHC.Read.Read a => GHC.Read.Read (Capnp.Untyped.IgnoreMut a mut) instance GHC.Show.Show a => GHC.Show.Show (Capnp.Untyped.IgnoreMut a mut) instance GHC.Base.Monad m => Control.Monad.Catch.MonadCatch (Capnp.Untyped.CatchTWrap m) instance GHC.Base.Monad m => Control.Monad.Catch.MonadThrow (Capnp.Untyped.CatchTWrap m) instance Control.Monad.Trans.Class.MonadTrans Capnp.Untyped.CatchTWrap instance GHC.Base.Monad m => GHC.Base.Monad (Capnp.Untyped.CatchTWrap m) instance GHC.Base.Monad m => GHC.Base.Applicative (Capnp.Untyped.CatchTWrap m) instance GHC.Base.Monad m => GHC.Base.Functor (Capnp.Untyped.CatchTWrap m) instance Control.Monad.Primitive.PrimMonad m => Control.Monad.Primitive.PrimMonad (Capnp.Untyped.CatchTWrap m) instance Capnp.Untyped.AllocateNormalList r => Capnp.Untyped.Allocate ('Capnp.Untyped.List ('GHC.Maybe.Just ('Capnp.Untyped.ListNormal r))) instance Capnp.Untyped.AllocateNormalList ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz0) instance Capnp.Untyped.AllocateNormalList ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz1) instance Capnp.Untyped.AllocateNormalList ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz8) instance Capnp.Untyped.AllocateNormalList ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz16) instance Capnp.Untyped.AllocateNormalList ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz32) instance Capnp.Untyped.AllocateNormalList ('Capnp.Untyped.NormalListData 'Capnp.Untyped.Sz64) instance Capnp.Untyped.AllocateNormalList 'Capnp.Untyped.NormalListPtr instance Capnp.Untyped.Allocate 'Capnp.Untyped.Struct instance Capnp.Untyped.Allocate 'Capnp.Untyped.Cap instance Capnp.Untyped.Allocate ('Capnp.Untyped.List ('GHC.Maybe.Just 'Capnp.Untyped.ListComposite)) instance Capnp.Untyped.IsPtrRepr ('GHC.Maybe.Just 'Capnp.Untyped.Struct) instance Capnp.Untyped.MessageDefault Capnp.Untyped.Struct instance Capnp.Untyped.MessageDefault (Capnp.Untyped.ListOf ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Struct))) instance (Capnp.Untyped.ListRepOf r GHC.Types.~ Capnp.Untyped.NormalList) => Capnp.Untyped.MessageDefault (Capnp.Untyped.ListOf r) instance Capnp.Untyped.MessageDefault Capnp.Untyped.NormalList instance Capnp.Untyped.MessageDefault Capnp.Untyped.StructList instance Capnp.Untyped.ListItem ('Capnp.Untyped.Ptr 'GHC.Maybe.Nothing) instance Capnp.Untyped.HasMessage Capnp.Message.WordPtr instance Capnp.Untyped.HasMessage Capnp.Untyped.Ptr instance Capnp.Untyped.HasMessage Capnp.Untyped.Cap instance Capnp.Untyped.HasMessage Capnp.Untyped.Struct instance Capnp.Untyped.HasMessage Capnp.Untyped.List instance Capnp.Untyped.HasMessage (Capnp.Untyped.ListOf ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Struct))) instance (Capnp.Untyped.ListRepOf r GHC.Types.~ Capnp.Untyped.NormalList) => Capnp.Untyped.HasMessage (Capnp.Untyped.ListOf r) instance Capnp.Untyped.HasMessage Capnp.Untyped.NormalList instance Capnp.Untyped.HasMessage Capnp.Untyped.StructList instance Capnp.Untyped.TraverseMsg Capnp.Message.WordPtr instance Capnp.Untyped.TraverseMsg Capnp.Untyped.Ptr instance Capnp.Untyped.TraverseMsg Capnp.Untyped.Cap instance Capnp.Untyped.TraverseMsg Capnp.Untyped.Struct instance Capnp.Untyped.TraverseMsg Capnp.Untyped.List instance Capnp.Untyped.TraverseMsg (Capnp.Untyped.ListRepOf r) => Capnp.Untyped.TraverseMsg (Capnp.Untyped.ListOf r) instance Capnp.Untyped.TraverseMsg Capnp.Untyped.NormalList instance Capnp.Untyped.TraverseMsg Capnp.Untyped.StructList instance Capnp.Untyped.IsListPtrRepr r => Capnp.Untyped.IsPtrRepr ('GHC.Maybe.Just ('Capnp.Untyped.List ('GHC.Maybe.Just r))) instance Capnp.Untyped.Element ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Cap)) instance Capnp.Untyped.IsPtrRepr ('GHC.Maybe.Just ('Capnp.Untyped.List a)) => Capnp.Untyped.Element ('Capnp.Untyped.Ptr ('GHC.Maybe.Just ('Capnp.Untyped.List a))) instance Capnp.Untyped.IsPtrRepr 'GHC.Maybe.Nothing instance Capnp.Untyped.IsPtrRepr ('GHC.Maybe.Just 'Capnp.Untyped.Cap) instance Capnp.Untyped.IsPtrRepr ('GHC.Maybe.Just ('Capnp.Untyped.List 'GHC.Maybe.Nothing)) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Struct)) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Data 'Capnp.Untyped.Sz0) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Data 'Capnp.Untyped.Sz1) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Data 'Capnp.Untyped.Sz8) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Data 'Capnp.Untyped.Sz16) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Data 'Capnp.Untyped.Sz32) instance Capnp.Untyped.ListItem ('Capnp.Untyped.Data 'Capnp.Untyped.Sz64) instance Capnp.Untyped.Element ('Capnp.Untyped.Data sz) instance Capnp.Untyped.Element ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Struct)) instance Capnp.Untyped.Element ('Capnp.Untyped.Ptr 'GHC.Maybe.Nothing) instance Capnp.Mutability.MaybeMutable (Capnp.Untyped.ListRepOf r) => Capnp.Mutability.MaybeMutable (Capnp.Untyped.ListOf r) -- | This module provides facilities for working with the wire -- representations of capnproto objects at the type level. The most -- central part of this module is the Repr type. -- -- Recommended reading: https://capnproto.org/encoding.html module Capnp.Repr -- | A Repr describes a wire representation for a value. This is -- mostly used at the type level (using DataKinds); types are -- parametrized over representations. data Repr -- | Pointer type. Nothing indicates an AnyPointer, Just -- describes a more specific pointer type. Ptr :: Maybe PtrRepr -> Repr -- | Non-pointer type. Data :: DataSz -> Repr -- | Information about the representation of a pointer type data PtrRepr -- | Capability pointer. Cap :: PtrRepr -- | List pointer. Nothing describes an AnyList, Just -- describes more specific list types. List :: Maybe ListRepr -> PtrRepr -- | A struct (or group). Struct :: PtrRepr -- | Information about the representation of a list type. data ListRepr -- | A "normal" list [ListNormal] :: NormalListRepr -> ListRepr -- | A composite (struct) list [ListComposite] :: ListRepr -- | Information about the representation of a normal (non-composite) list. data NormalListRepr [NormalListData] :: DataSz -> NormalListRepr [NormalListPtr] :: NormalListRepr -- | The size of a non-pointer type. SzN represents an -- N-bit value. data DataSz Sz0 :: DataSz Sz1 :: DataSz Sz8 :: DataSz Sz16 :: DataSz Sz32 :: DataSz Sz64 :: DataSz -- | Untyped r mut is an untyped value with representation -- r stored in a message with mutability mut. -- -- Note that the return type of this type family has kind -- Mutability -> Type. This is important, as it -- allows us to define instances on Untyped r, and use -- Untyped r in constraints. -- -- This introduces some awkwardnesses though -- we really want this to be -- (Maybe (Ptr mut)) for 'Ptr 'Nothing, and Int -- typesBool() for 'Data sz. But we can't because these -- are the wrong kind. -- -- So, we hack around this by introducing two newtypes, IgnoreMut -- and MaybePtr, and a type family Unwrapped, which lets us -- use Unwrapped (Untyped r mut) as the type we -- really want in some places, though we can't curry it then. -- -- All this is super super awkward, but this is a low level -- mostly-internal API; most users will intract with this through the Raw -- type in Capnp.Repr, which hides all of this... type family Untyped (r :: Repr) :: Mutability -> Type -- | UntypedData sz is an untyped value with size sz. type family UntypedData (sz :: DataSz) :: Type -- | Like Untyped, but for pointers only. type family UntypedPtr (r :: Maybe PtrRepr) :: Mutability -> Type -- | Like UntypedPtr, but doesn't allow AnyPointers. type family UntypedSomePtr (r :: PtrRepr) :: Mutability -> Type -- | Like Untyped, but for lists only. type family UntypedList (r :: Maybe ListRepr) :: Mutability -> Type -- | Like UntypedList, but doesn't allow AnyLists. type family UntypedSomeList (r :: ListRepr) :: Mutability -> Type -- | ReprFor a denotes the Cap'n Proto wire represent of -- the type a. type family ReprFor (a :: Type) :: Repr -- | PtrReprFor r extracts the pointer represnetation in r; -- undefined if r is not a pointer representation. type family PtrReprFor (r :: Repr) :: Maybe PtrRepr -- | Element supports converting between values of representation -- ElemRepr (ListReprFor r) and values of -- representation r. -- -- At a glance, you might expect this to just be a no-op, but it is -- actually *not* always the case that ElemRepr -- (ListReprFor r) ~ r; in the case of pointer types, -- ListReprFor r can contain arbitrary pointers, so -- information is lost, and it is possible for the list to contain -- pointers of the incorrect type. In this case, fromElement will -- throw an error. -- -- toElement is more trivial. class Element (r :: Repr) fromElement :: forall m mut. (Element r, ReadCtx m mut) => Message mut -> Unwrapped (Untyped (ElemRepr (ListReprFor r)) mut) -> m (Unwrapped (Untyped r mut)) toElement :: Element r => Unwrapped (Untyped r mut) -> Unwrapped (Untyped (ElemRepr (ListReprFor r)) mut) -- | ElemRepr r is the representation of elements of lists with -- representation r. type family ElemRepr (rl :: ListRepr) :: Repr -- | ListReprFor e is the representation of lists with elements -- whose representation is e. type family ListReprFor (e :: Repr) :: ListRepr -- | Operations on types with pointer representations. class IsPtrRepr (r :: Maybe PtrRepr) -- | Convert an untyped value of this representation to an AnyPointer. toPtr :: IsPtrRepr r => Unwrapped (Untyped ('Ptr r) mut) -> Maybe (Ptr mut) -- | Extract a value with this representation from an AnyPointer, failing -- if the pointer is the wrong type for this representation. fromPtr :: (IsPtrRepr r, ReadCtx m mut) => Message mut -> Maybe (Ptr mut) -> m (Unwrapped (Untyped ('Ptr r) mut)) -- | Operations on types with list representations. class IsListPtrRepr (r :: ListRepr) -- | Convert an untyped value of this representation to an AnyList. rToList :: IsListPtrRepr r => UntypedSomeList r mut -> List mut -- | Extract a value with this representation from an AnyList, failing if -- the list is the wrong type for this representation. rFromList :: (IsListPtrRepr r, ReadCtx m mut) => List mut -> m (UntypedSomeList r mut) -- | Create a zero-length value with this representation, living in the -- provided message. rFromListMsg :: (IsListPtrRepr r, ReadCtx m mut) => Message mut -> m (UntypedSomeList r mut) -- | A Raw mut a is an a embedded in a capnproto -- message with mutability mut. newtype Raw (a :: Type) (mut :: Mutability) Raw :: Unwrapped (Untyped (ReprFor a) mut) -> Raw (a :: Type) (mut :: Mutability) [fromRaw] :: Raw (a :: Type) (mut :: Mutability) -> Unwrapped (Untyped (ReprFor a) mut) -- | A phantom type denoting capnproto lists of type a. data List a -- | Get the length of a capnproto list. length :: ListElem a => Raw (List a) mut -> Int -- | index i list gets the ith element of the -- list. index :: forall a m mut. (ReadCtx m mut, HasMessage (ListOf (ElemRepr (ListReprFor (ReprFor a)))), ListElem a) => Int -> Raw (List a) mut -> m (Raw a mut) -- | setIndex value i list sets the ith element of -- list to value. setIndex :: forall a m s. (RWCtx m s, ListItem (ElemRepr (ListReprFor (ReprFor a))), Element (ReprFor a)) => Raw a ('Mut s) -> Int -> Raw (List a) ('Mut s) -> m () -- | An instace of Allocate specifies how to allocate a -- value with a given representation. This only makes sense for pointers -- of course, so it is defined on PtrRepr. Of the well-kinded types, only -- 'List 'Nothing is missing an instance. class Allocate (r :: PtrRepr) where { -- | Extra information needed to allocate a value: -- -- type AllocHint r; } -- | Allocate a value of the given type. alloc :: (Allocate r, RWCtx m s) => Message ('Mut s) -> AllocHint r -> m (Unwrapped (UntypedSomePtr r ('Mut s))) -- | Constraint that a is a struct type. type IsStruct a = ReprFor a ~ 'Ptr ('Just 'Struct) -- | Constraint that a is a capability type. type IsCap a = ReprFor a ~ 'Ptr ('Just 'Cap) -- | Constraint that a is a pointer type. type IsPtr a = (ReprFor a ~ 'Ptr (PtrReprFor (ReprFor a)), Untyped (ReprFor a) ~ UntypedPtr (PtrReprFor (ReprFor a)), IsPtrRepr (PtrReprFor (ReprFor a))) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Struct)) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Cap)) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr ('GHC.Maybe.Just ('Capnp.Untyped.List 'GHC.Maybe.Nothing))) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr ('GHC.Maybe.Just ('Capnp.Untyped.List ('GHC.Maybe.Just 'Capnp.Untyped.ListComposite)))) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr ('GHC.Maybe.Just ('Capnp.Untyped.List ('GHC.Maybe.Just ('Capnp.Untyped.ListNormal 'Capnp.Untyped.NormalListPtr))))) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr ('GHC.Maybe.Just ('Capnp.Untyped.List ('GHC.Maybe.Just ('Capnp.Untyped.ListNormal ('Capnp.Untyped.NormalListData sz)))))) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Data sz) instance GHC.Show.Show (Capnp.Untyped.Unwrapped (Capnp.Untyped.Untyped (Capnp.Repr.ReprFor a) mut)) => GHC.Show.Show (Capnp.Repr.Raw a mut) instance GHC.Read.Read (Capnp.Untyped.Unwrapped (Capnp.Untyped.Untyped (Capnp.Repr.ReprFor a) mut)) => GHC.Read.Read (Capnp.Repr.Raw a mut) instance GHC.Classes.Eq (Capnp.Untyped.Unwrapped (Capnp.Untyped.Untyped (Capnp.Repr.ReprFor a) mut)) => GHC.Classes.Eq (Capnp.Repr.Raw a mut) instance GHC.Generics.Generic (Capnp.Untyped.Unwrapped (Capnp.Untyped.Untyped (Capnp.Repr.ReprFor a) mut)) => GHC.Generics.Generic (Capnp.Repr.Raw a mut) instance Capnp.Repr.ReprMaybeMutable (Capnp.Repr.ReprFor a) => Capnp.Mutability.MaybeMutable (Capnp.Repr.Raw a) instance Capnp.Repr.ReprMaybeMutable ('Capnp.Untyped.Ptr 'GHC.Maybe.Nothing) instance Capnp.Untyped.HasMessage (Capnp.Untyped.Untyped (Capnp.Repr.ReprFor a)) => Capnp.Untyped.HasMessage (Capnp.Repr.Raw a) instance Capnp.Untyped.MessageDefault (Capnp.Untyped.Untyped (Capnp.Repr.ReprFor a)) => Capnp.Untyped.MessageDefault (Capnp.Repr.Raw a) instance Capnp.Untyped.MessageDefault (Capnp.Repr.Raw a) => Data.Default.Class.Default (Capnp.Repr.Raw a 'Capnp.Mutability.Const) -- | This module contains several type classes (and related utilities) -- useful for operating over Cap'n Proto values. module Capnp.Classes -- | Capnp types that can be parsed into a more "natural" Haskell form. -- -- class Parse t p | t -> p, p -> t -- | Parse a value from a constant message parse :: (Parse t p, ReadCtx m 'Const) => Raw t 'Const -> m p -- | Encode a value into Raw form, using the message as storage. encode :: (Parse t p, RWCtx m s) => Message ('Mut s) -> p -> m (Raw t ('Mut s)) -- | Encode a value into Raw form, using the message as storage. encode :: (Parse t p, RWCtx m s, EstimateAlloc t p, Marshal t p) => Message ('Mut s) -> p -> m (Raw t ('Mut s)) -- | If a is a capnproto type, then Parsed a is an ADT -- representation of that type. If this is defined for a type a -- then there should also be an instance Parse a -- (Parsed a), but note that the converse is not true: if -- there is an instance Parse a b, then Parsed -- a needn't be defined, and b can be something else. data family Parsed a -- | An instance of marshal allows a parsed value to be inserted into -- pre-allocated space in a message. class Parse t p => Marshal t p -- | Marshal a value into the pre-allocated object inside the message. -- -- Note that caller must arrange for the object to be of the correct -- size. This is is not necessarily guaranteed; for example, list types -- must coordinate the length of the list. marshalInto :: (Marshal t p, RWCtx m s) => Raw t ('Mut s) -> p -> m () -- | Type alias capturing the constraints on a type needed by -- marshalElement type MarshalElement a ap = (Parse a ap, EstimateListAlloc a ap, Element (ReprFor a), ListItem (ElemRepr (ListReprFor (ReprFor a))), HasMessage (ListOf (ElemRepr (ListReprFor (ReprFor a)))), MarshalElementByRepr (ListReprFor (ReprFor a)), MarshalElementReprConstraints (ListReprFor (ReprFor a)) a ap) -- | Types which may be allocated directly inside a message. class Allocate a where { -- | Extra information needed to allocate a value of this type, e.g. the -- length for a list. May be () if no extra info is needed. type AllocHint a; } -- | new hint msg allocates a new value of type a -- inside msg. new :: (Allocate a, RWCtx m s) => AllocHint a -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | new hint msg allocates a new value of type a -- inside msg. new :: (Allocate a, ReprFor a ~ 'Ptr ('Just pr), Allocate pr, AllocHint a ~ AllocHint pr, RWCtx m s) => AllocHint a -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | Like new, but also sets the value as the root of the message. newRoot :: forall a m s. (RWCtx m s, IsStruct a, Allocate a) => AllocHint a -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | Like Allocate, but for allocating *lists* of a. class AllocateList a where { -- | Extra information needed to allocate a list of as. type ListAllocHint a; } newList :: (AllocateList a, RWCtx m s) => ListAllocHint a -> Message ('Mut s) -> m (Raw (List a) ('Mut s)) newList :: forall m s lr r. (AllocateList a, RWCtx m s, lr ~ ListReprFor (ReprFor a), r ~ 'List ('Just lr), Allocate r, AllocHint r ~ ListAllocHint a) => ListAllocHint a -> Message ('Mut s) -> m (Raw (List a) ('Mut s)) -- | Types where the necessary allocation is inferrable from the parsed -- form. -- -- ...this is most types. class (Parse t p, Allocate t) => EstimateAlloc t p -- | Determine the appropriate hint needed to allocate space for the -- serialied form of the value. estimateAlloc :: EstimateAlloc t p => p -> AllocHint t -- | Determine the appropriate hint needed to allocate space for the -- serialied form of the value. estimateAlloc :: (EstimateAlloc t p, AllocHint t ~ ()) => p -> AllocHint t class (Parse a ap, Allocate (List a)) => EstimateListAlloc a ap estimateListAlloc :: EstimateListAlloc a ap => Vector ap -> AllocHint (List a) estimateListAlloc :: (EstimateListAlloc a ap, AllocHint (List a) ~ Int) => Vector ap -> AllocHint (List a) -- | Implementation of new valid for types whose AllocHint is -- the same as that of their underlying representation. newFromRepr :: forall a r m s. (Allocate r, 'Ptr ('Just r) ~ ReprFor a, RWCtx m s) => AllocHint r -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | Sets the struct to be the root of its containing message. setRoot :: (RWCtx m s, IsStruct a) => Raw a ('Mut s) -> m () -- | Types which have a numeric type-id defined in a capnp schema. class HasTypeId a -- | The node id for this type. You will generally want to use the -- TypeApplications extension to specify the type. typeId :: HasTypeId a => Word64 -- | Operations on typed structs. class (IsStruct a, Allocate a, HasTypeId a, AllocHint a ~ ()) => TypedStruct a numStructWords :: TypedStruct a => Word16 numStructPtrs :: TypedStruct a => Word16 -- | Allocate a new typed struct. Mainly used as the value for new -- for in generated instances of Allocate. newTypedStruct :: forall a m s. (TypedStruct a, RWCtx m s) => Message ('Mut s) -> m (Raw a ('Mut s)) -- | Like newTypedStruct, but for lists. newTypedStructList :: forall a m s. (TypedStruct a, RWCtx m s) => Int -> Message ('Mut s) -> m (Raw (List a) ('Mut s)) -- | Get the maximum word and pointer counts needed for a struct type's -- fields. structSizes :: forall a. TypedStruct a => (Word16, Word16) -- | An instance Super p c indicates that the interface -- c extends the interface p. class (IsCap p, IsCap c) => Super p c -- | Types that can be converted to and from a 64-bit word. -- -- Anything that goes in the data section of a struct will have an -- instance of this. class IsWord a -- | Convert from a 64-bit words Truncates the word if the type has less -- than 64 bits. fromWord :: IsWord a => Word64 -> a -- | Convert to a 64-bit word. toWord :: IsWord a => a -> Word64 instance Capnp.Classes.IsWord GHC.Int.Int8 instance Capnp.Classes.IsWord GHC.Int.Int16 instance Capnp.Classes.IsWord GHC.Int.Int32 instance Capnp.Classes.IsWord GHC.Int.Int64 instance Capnp.Classes.IsWord GHC.Word.Word8 instance Capnp.Classes.IsWord GHC.Word.Word16 instance Capnp.Classes.IsWord GHC.Word.Word32 instance Capnp.Classes.IsWord GHC.Word.Word64 instance Capnp.Classes.IsWord GHC.Types.Float instance Capnp.Classes.IsWord GHC.Types.Double instance Capnp.Classes.IsWord GHC.Types.Bool instance Capnp.Classes.IsWord Capnp.Bits.Word1 instance Capnp.Classes.Parse () () instance Capnp.Classes.Parse GHC.Types.Bool GHC.Types.Bool instance Capnp.Classes.Parse GHC.Word.Word8 GHC.Word.Word8 instance Capnp.Classes.Parse GHC.Word.Word16 GHC.Word.Word16 instance Capnp.Classes.Parse GHC.Word.Word32 GHC.Word.Word32 instance Capnp.Classes.Parse GHC.Word.Word64 GHC.Word.Word64 instance Capnp.Classes.Parse GHC.Int.Int8 GHC.Int.Int8 instance Capnp.Classes.Parse GHC.Int.Int16 GHC.Int.Int16 instance Capnp.Classes.Parse GHC.Int.Int32 GHC.Int.Int32 instance Capnp.Classes.Parse GHC.Int.Int64 GHC.Int.Int64 instance Capnp.Classes.AllocateList () instance Capnp.Classes.EstimateListAlloc () () instance Capnp.Classes.AllocateList GHC.Types.Bool instance Capnp.Classes.EstimateListAlloc GHC.Types.Bool GHC.Types.Bool instance Capnp.Classes.AllocateList GHC.Word.Word8 instance Capnp.Classes.EstimateListAlloc GHC.Word.Word8 GHC.Word.Word8 instance Capnp.Classes.AllocateList GHC.Word.Word16 instance Capnp.Classes.EstimateListAlloc GHC.Word.Word16 GHC.Word.Word16 instance Capnp.Classes.AllocateList GHC.Word.Word32 instance Capnp.Classes.EstimateListAlloc GHC.Word.Word32 GHC.Word.Word32 instance Capnp.Classes.AllocateList GHC.Word.Word64 instance Capnp.Classes.EstimateListAlloc GHC.Word.Word64 GHC.Word.Word64 instance Capnp.Classes.AllocateList GHC.Int.Int8 instance Capnp.Classes.EstimateListAlloc GHC.Int.Int8 GHC.Int.Int8 instance Capnp.Classes.AllocateList GHC.Int.Int16 instance Capnp.Classes.EstimateListAlloc GHC.Int.Int16 GHC.Int.Int16 instance Capnp.Classes.AllocateList GHC.Int.Int32 instance Capnp.Classes.EstimateListAlloc GHC.Int.Int32 GHC.Int.Int32 instance Capnp.Classes.AllocateList GHC.Int.Int64 instance Capnp.Classes.EstimateListAlloc GHC.Int.Int64 GHC.Int.Int64 instance Capnp.Classes.AllocateList GHC.Types.Float instance Capnp.Classes.EstimateListAlloc GHC.Types.Float GHC.Types.Float instance Capnp.Classes.AllocateList GHC.Types.Double instance Capnp.Classes.EstimateListAlloc GHC.Types.Double GHC.Types.Double instance (Data.Default.Class.Default (Capnp.Repr.Raw a 'Capnp.Mutability.Const), Capnp.Classes.Parse a (Capnp.Classes.Parsed a)) => Data.Default.Class.Default (Capnp.Classes.Parsed a) instance Capnp.Classes.MarshalElement a ap => Capnp.Classes.Marshal (Capnp.Repr.List a) (Data.Vector.Vector ap) instance Capnp.Classes.MarshalElement a ap => Capnp.Classes.Parse (Capnp.Repr.List a) (Data.Vector.Vector ap) instance Capnp.Classes.MarshalElementByRepr 'Capnp.Untyped.ListComposite instance (Capnp.Untyped.HasMessage (Capnp.Untyped.ListOf (Capnp.Untyped.ElemRepr ('Capnp.Untyped.ListNormal l))), Capnp.Untyped.ListItem (Capnp.Untyped.ElemRepr ('Capnp.Untyped.ListNormal l))) => Capnp.Classes.MarshalElementByRepr ('Capnp.Untyped.ListNormal l) instance Capnp.Classes.MarshalElement a ap => Capnp.Classes.EstimateAlloc (Capnp.Repr.List a) (Data.Vector.Vector ap) instance (Capnp.Classes.Parse (Capnp.Repr.List a) (Data.Vector.Vector ap), Capnp.Classes.Allocate (Capnp.Repr.List a)) => Capnp.Classes.EstimateListAlloc (Capnp.Repr.List a) (Data.Vector.Vector ap) instance Capnp.Classes.Parse GHC.Types.Float GHC.Types.Float instance Capnp.Classes.Parse GHC.Types.Double GHC.Types.Double instance Capnp.Classes.AllocateList a => Capnp.Classes.Allocate (Capnp.Repr.List a) instance Capnp.Classes.AllocateList (Capnp.Repr.List a) module Capnp.Fields -- | An instance HasField name k a b indicates that the -- struct type a has a field named name with type -- b (with k being the FieldKind for the field). -- The generated code includes instances of this for each field in the -- schema. class IsStruct a => HasField (name :: Symbol) k a b | a name -> k b fieldByLabel :: HasField name k a b => Field k a b -- | Field k a b is a first-class representation of a field -- of type b within an a, where a must be a -- struct type. newtype Field (k :: FieldKind) a b Field :: FieldLoc k (ReprFor b) -> Field (k :: FieldKind) a b -- | The location of a field within a message. data FieldLoc (k :: FieldKind) (r :: Repr) [GroupField] :: FieldLoc 'Group ('Ptr ('Just 'Struct)) [PtrField] :: IsPtrRepr a => Word16 -> FieldLoc 'Slot ('Ptr a) [DataField] :: IsWord (UntypedData a) => DataFieldLoc a -> FieldLoc 'Slot ('Data a) [VoidField] :: FieldLoc 'Slot ('Data 'Sz0) -- | The location of a data (non-pointer) field. data DataFieldLoc (sz :: DataSz) DataFieldLoc :: !BitCount -> !Word16 -> !Word64 -> !Word64 -> DataFieldLoc (sz :: DataSz) [shift] :: DataFieldLoc (sz :: DataSz) -> !BitCount [index] :: DataFieldLoc (sz :: DataSz) -> !Word16 [mask] :: DataFieldLoc (sz :: DataSz) -> !Word64 [defaultValue] :: DataFieldLoc (sz :: DataSz) -> !Word64 -- | What sort of field is this? This corresponds to the slot/group -- variants in the Field type in schema.capnp. Mostly used at -- the type level with the DataKinds extension. -- -- (Note that this has nothing to do with kinds in the usual type system -- sense of the word). data FieldKind -- | The field is a normal slot; it can be read and written as an -- individual value. Slot :: FieldKind -- | The field is a group. Since this shares space with its parent struct -- access patterns are a bit different. Group :: FieldKind -- | An instance of HasUnion indicates that the given type is a -- capnproto struct (or group) with an anonymous union. class IsStruct a => HasUnion a where { -- | Which is the abstract capnproto type of the union itself. Like -- generated struct types (in this case a), this is typically -- uninhabitied, and used to define instances and/or act as a phantom -- type. data Which a; -- | Concrete view into a union embedded in a message. This will be a sum -- type with other Raw values as arguments. data RawWhich a (mut :: Mutability); } -- | unionField is a field holding the union's tag. unionField :: HasUnion a => Field 'Slot a Word16 -- | Helper used in generated code to extract a RawWhich from its -- surrounding struct. internalWhich :: (HasUnion a, ReadCtx m mut) => Word16 -> Raw a mut -> m (RawWhich a mut) -- | Variant k a b is a first-class representation of a -- variant of a's anonymous union, whose argument is of type -- b. data Variant (k :: FieldKind) a b Variant :: !Field k a b -> !Word16 -> Variant (k :: FieldKind) a b [field] :: Variant (k :: FieldKind) a b -> !Field k a b [tagValue] :: Variant (k :: FieldKind) a b -> !Word16 -- | An instance 'HasVariant name k a b indicates that the struct -- type a has an anonymous union with a variant named -- name, whose argument is of type b. class HasUnion a => HasVariant (name :: Symbol) k a b | a name -> k b variantByLabel :: HasVariant name k a b => Variant k a b instance GHC.Classes.Eq Capnp.Fields.FieldKind instance GHC.Read.Read Capnp.Fields.FieldKind instance GHC.Show.Show Capnp.Fields.FieldKind instance Capnp.Fields.HasVariant name k a b => GHC.OverloadedLabels.IsLabel name (Capnp.Fields.Variant k a b) instance Capnp.Fields.HasField name k a b => GHC.OverloadedLabels.IsLabel name (Capnp.Fields.Field k a b) instance (Capnp.Classes.Allocate a, Capnp.Fields.HasUnion a, Capnp.Repr.IsStruct (Capnp.Fields.Which a)) => Capnp.Classes.Allocate (Capnp.Fields.Which a) instance (Capnp.Classes.Allocate (Capnp.Fields.Which a), Capnp.Classes.AllocHint (Capnp.Fields.Which a) GHC.Types.~ (), Capnp.Classes.Parse (Capnp.Fields.Which a) p) => Capnp.Classes.EstimateAlloc (Capnp.Fields.Which a) p -- | This module provides various helper functions to convert between -- messages, types defined in capnproto schema (called "values" in the -- rest of this module's documentation), bytestrings (both lazy and -- strict), and bytestring builders. -- -- Note that most of the functions which decode messages or raw bytes do -- *not* need to be run inside of an instance of MonadLimit; -- they choose an appropriate limit based on the size of the input. -- -- Note that not all conversions exist or necessarily make sense. module Capnp.Convert -- | Convert an immutable message to a bytestring Builder. To -- convert a mutable message, freeze it first. msgToBuilder :: Message 'Const -> Builder -- | Convert an immutable message to a lazy ByteString. To convert a -- mutable message, freeze it first. msgToLBS :: Message 'Const -> ByteString -- | Convert an immutable message to a strict ByteString. To convert -- a mutable message, freeze it first. msgToBS :: Message 'Const -> ByteString -- | Convert a strict ByteString to a message. bsToMsg :: MonadThrow m => ByteString -> m (Message 'Const) -- | Convert a lazy ByteString to a message. lbsToMsg :: MonadThrow m => ByteString -> m (Message 'Const) -- | Get the root pointer of a message, wrapped as a Raw. msgToRaw :: forall a m mut. (ReadCtx m mut, IsStruct a) => Message mut -> m (Raw a mut) -- | Get the root pointer of a message, as a parsed ADT. msgToParsed :: forall a m pa. (ReadCtx m 'Const, IsStruct a, Parse a pa) => Message 'Const -> m pa -- | Like msgToRaw, but takes a (strict) bytestring. bsToRaw :: forall a m. (ReadCtx m 'Const, IsStruct a) => ByteString -> m (Raw a 'Const) -- | Like msgToParsed, but takes a (strict) bytestring. bsToParsed :: forall a pa m. (ReadCtx m 'Const, IsStruct a, Parse a pa) => ByteString -> m pa -- | Like msgToRaw, but takes a (lazy) bytestring. lbsToRaw :: forall a m. (ReadCtx m 'Const, IsStruct a) => ByteString -> m (Raw a 'Const) -- | Like msgToParsed, but takes a (lazzy) bytestring. lbsToParsed :: forall a pa m. (ReadCtx m 'Const, IsStruct a, Parse a pa) => ByteString -> m pa -- | Serialize the parsed form of a struct into its Raw form, and -- make it the root of its message. parsedToRaw :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m (Raw a ('Mut s)) -- | Serialize the parsed form of a struct into a message with that value -- as its root, returning the message. parsedToMsg :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m (Message ('Mut s)) -- | Serialize the parsed form of a struct and return it as a -- Builder parsedToBuilder :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m Builder -- | Serialize the parsed form of a struct and return it as a strict -- ByteString parsedToBS :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m ByteString -- | Serialize the parsed form of a struct and return it as a lazy -- ByteString parsedToLBS :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m ByteString -- | This module provides utilities for reading and writing values to and -- from file Handles. module Capnp.IO -- | Like hGetMsg, except that it takes a socket instead of a -- Handle. sGetMsg :: Socket -> WordCount -> IO (Message 'Const) -- | Like hPutMsg, except that it takes a Socket instead of -- a Handle. sPutMsg :: Socket -> Message 'Const -> IO () -- | hGetMsg handle limit reads a message from -- handle that is at most limit 64-bit words in length. hGetMsg :: Handle -> WordCount -> IO (Message 'Const) -- | Equivalent to hGetMsg stdin getMsg :: WordCount -> IO (Message 'Const) -- | hPutMsg handle msg writes msg to -- handle. If there is an exception, it will be an -- IOError raised by the underlying IO libraries. hPutMsg :: Handle -> Message 'Const -> IO () -- | Equivalent to hPutMsg stdout putMsg :: Message 'Const -> IO () -- | Read a struct from the handle in its parsed form, using the supplied -- read limit. hGetParsed :: forall a pa. (IsStruct a, Parse a pa) => Handle -> WordCount -> IO pa -- | Read a struct from the socket in its parsed form, using the supplied -- read limit. sGetParsed :: forall a pa. (IsStruct a, Parse a pa) => Socket -> WordCount -> IO pa -- | Read a struct from stdin in its parsed form, using the supplied read -- limit. getParsed :: (IsStruct a, Parse a pa) => WordCount -> IO pa -- | Write the parsed form of a struct to the handle hPutParsed :: (IsStruct a, Parse a pa) => Handle -> pa -> IO () -- | Write the parsed form of a struct to the socket. sPutParsed :: (IsStruct a, Parse a pa) => Socket -> pa -> IO () -- | Write the parsed form of a struct to stdout putParsed :: (IsStruct a, Parse a pa) => pa -> IO () -- | Read a struct from the handle using the supplied read limit, and -- return its root pointer. hGetRaw :: IsStruct a => Handle -> WordCount -> IO (Raw a 'Const) -- | Read a struct from stdin using the supplied read limit, and return its -- root pointer. getRaw :: IsStruct a => WordCount -> IO (Raw a 'Const) -- | Read a struct from the socket using the supplied read limit, and -- return its root pointer. sGetRaw :: IsStruct a => Socket -> WordCount -> IO (Raw a 'Const) -- | This module contains phantom types for built-in Cap'n Proto types, -- analogous to the phantom types generated for structs by the code -- generator. It also defines applicable type class instances. module Capnp.Basics -- | The Cap'n Proto Text type. data Text -- | The Cap'n Proto Data type. data Data -- | A Cap'n Proto AnyPointer, i.e. an arbitrary pointer with -- unknown schema. data AnyPointer -- | A Cap'n Proto List with unknown element type. data AnyList -- | A Cap'n Proto struct of unknown type. data AnyStruct -- | A Cap'n Proto capability with unknown interfaces. data Capability type ParsedList a = Vector a -- | Return the underlying buffer containing the text. This does not -- include the null terminator. textBuffer :: MonadThrow m => Raw Text mut -> m (Raw Data mut) -- | Convert a Text to a ByteString, comprising the raw bytes -- of the text (not counting the NUL terminator). textBytes :: ReadCtx m 'Const => Raw Text 'Const -> m ByteString instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Basics.AnyPointer) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Basics.AnyPointer) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Basics.AnyPointer) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Basics.AnyList) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Basics.AnyList) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Basics.AnyList) instance Capnp.Classes.Parse Capnp.Basics.Capability Internal.Rpc.Breaker.Client instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance Capnp.Classes.Parse Capnp.Basics.AnyStruct (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance Capnp.Classes.AllocateList Capnp.Basics.AnyStruct instance Capnp.Classes.EstimateListAlloc Capnp.Basics.AnyStruct (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance Capnp.Classes.EstimateAlloc Capnp.Basics.AnyStruct (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance Capnp.Classes.Marshal Capnp.Basics.AnyStruct (Capnp.Classes.Parsed Capnp.Basics.AnyStruct) instance Capnp.Classes.Allocate Capnp.Basics.AnyStruct instance Capnp.Classes.Parse Capnp.Basics.AnyList (Capnp.Classes.Parsed Capnp.Basics.AnyList) instance Capnp.Classes.Parse (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) (GHC.Maybe.Maybe (Capnp.Classes.Parsed Capnp.Basics.AnyPointer)) instance Capnp.Classes.Parse Capnp.Basics.AnyPointer (Capnp.Classes.Parsed Capnp.Basics.AnyPointer) instance Capnp.Classes.AllocateList Capnp.Basics.AnyPointer instance Capnp.Classes.EstimateListAlloc Capnp.Basics.AnyPointer (Capnp.Classes.Parsed Capnp.Basics.AnyPointer) instance Capnp.Classes.AllocateList (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.EstimateListAlloc (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) (GHC.Maybe.Maybe (Capnp.Classes.Parsed Capnp.Basics.AnyPointer)) instance Capnp.Classes.Parse Capnp.Basics.Text Data.Text.Internal.Text instance Capnp.Classes.Parse Capnp.Basics.Data Data.ByteString.Internal.ByteString instance Capnp.Classes.Allocate Capnp.Basics.Data instance Capnp.Classes.EstimateAlloc Capnp.Basics.Data Data.ByteString.Internal.ByteString instance Capnp.Classes.AllocateList Capnp.Basics.Data instance Capnp.Classes.EstimateListAlloc Capnp.Basics.Data Data.ByteString.Internal.ByteString instance Capnp.Classes.Marshal Capnp.Basics.Data Data.ByteString.Internal.ByteString instance Capnp.Classes.Allocate Capnp.Basics.Text instance Capnp.Classes.AllocateList Capnp.Basics.Text instance Capnp.Classes.EstimateListAlloc Capnp.Basics.Text Data.Text.Internal.Text module Capnp.Repr.Parsed -- | Parsed a is the high-level/ADT representation of the -- capnproto type a. For struct types this is equivalent to -- Parsed a, but we special case other types, such that -- e.g. Parsed Data = ByteString. type Parsed a = ParsedByRepr (ReprFor a) a module Capnp.Constraints -- | Constraints needed for a to be a capnproto type parameter. type TypeParam a = (IsPtr a, Parse a (Parsed a)) module Capnp.Accessors -- | Read the value of a field of a struct. readField :: forall k a b mut m. (IsStruct a, ReadCtx m mut) => Field k a b -> Raw a mut -> m (Raw b mut) -- | Like readField, but: -- -- getField :: (IsStruct a, ReprFor b ~ 'Data sz, Parse b bp) => Field 'Slot a b -> Raw a 'Const -> bp -- | Set a struct field to a value. Not usable for group fields. setField :: forall a b m s. (IsStruct a, RWCtx m s) => Field 'Slot a b -> Raw b ('Mut s) -> Raw a ('Mut s) -> m () -- | Allocate space for the value of a field, and return it. newField :: forall a b m s. (IsStruct a, Allocate b, RWCtx m s) => Field 'Slot a b -> AllocHint b -> Raw a ('Mut s) -> m (Raw b ('Mut s)) -- | Return whether the specified field is present. Only applicable for -- pointer fields. hasField :: (ReadCtx m mut, IsStruct a, IsPtr b) => Field 'Slot a b -> Raw a mut -> m Bool -- | Marshal a parsed value into a struct's field. encodeField :: forall a b m s bp. (IsStruct a, Parse b bp, RWCtx m s) => Field 'Slot a b -> bp -> Raw a ('Mut s) -> m () -- | parse a struct's field and return its parsed form. parseField :: (IsStruct a, Parse b bp, ReadCtx m 'Const) => Field k a b -> Raw a 'Const -> m bp -- | Set the struct's anonymous union to the given variant, with the -- supplied value as its argument. Not applicable for variants whose -- argument is a group; use initVariant instead. setVariant :: forall a b m s. (HasUnion a, RWCtx m s) => Variant 'Slot a b -> Raw a ('Mut s) -> Raw b ('Mut s) -> m () -- | Set the struct's anonymous union to the given variant, returning the -- variant's argument, which must be a group (for non-group fields, use -- setVariant or encodeVariant. initVariant :: forall a b m s. (HasUnion a, RWCtx m s) => Variant 'Group a b -> Raw a ('Mut s) -> m (Raw b ('Mut s)) -- | Set the struct's anonymous union to the given variant, marshalling the -- supplied value into the message to be its argument. Not applicable for -- variants whose argument is a group; use initVariant instead. encodeVariant :: forall a b m s bp. (HasUnion a, Parse b bp, RWCtx m s) => Variant 'Slot a b -> bp -> Raw a ('Mut s) -> m () -- | Get a non-opaque view on the struct's anonymous union, which can be -- used to pattern match on. structWhich :: forall a mut m. (ReadCtx m mut, HasUnion a) => Raw a mut -> m (RawWhich a mut) -- | Get a non-opaque view on the anonymous union, which can be used to -- pattern match on. unionWhich :: forall a mut m. (ReadCtx m mut, HasUnion a) => Raw (Which a) mut -> m (RawWhich a mut) -- | Get the anonymous union for a struct. structUnion :: HasUnion a => Raw a mut -> Raw (Which a) mut -- | Get the struct enclosing an anonymous union. unionStruct :: HasUnion a => Raw (Which a) mut -> Raw a mut module Capnp.GenHelpers dataField :: forall b a sz. (ReprFor b ~ 'Data sz, IsWord (UntypedData sz)) => BitCount -> Word16 -> BitCount -> Word64 -> Field 'Slot a b ptrField :: forall a b. IsPtr b => Word16 -> Field 'Slot a b groupField :: ReprFor b ~ 'Ptr ('Just 'Struct) => Field 'Group a b voidField :: ReprFor b ~ 'Data 'Sz0 => Field 'Slot a b -- | Like readField, but accepts a variant. Warning: *DOES NOT -- CHECK* that the variant is the one that is set. This should only be -- used by generated code. readVariant :: forall k a b mut m. (IsStruct a, ReadCtx m mut) => Variant k a b -> Raw a mut -> m (Raw b mut) -- | Mutability is used as a type parameter (with the DataKinds -- extension) to indicate the mutability of some values in this library; -- Const denotes an immutable value, while Mut s -- denotes a value that can be mutated in the scope of the state token -- s. data Mutability Const :: Mutability Mut :: Type -> Mutability -- | Constraints needed for a to be a capnproto type parameter. type TypeParam a = (IsPtr a, Parse a (Parsed a)) newStruct :: forall a m s. (RWCtx m s, TypedStruct a) => () -> Message ('Mut s) -> m (Raw a ('Mut s)) parseEnum :: (ReprFor a ~ 'Data 'Sz16, Enum a, Applicative m) => Raw a 'Const -> m a encodeEnum :: forall a m s. (ReprFor a ~ 'Data 'Sz16, Enum a, RWCtx m s) => Message ('Mut s) -> a -> m (Raw a ('Mut s)) -- | Get a pointer from a ByteString, where the root object is a struct -- with one pointer, which is the pointer we will retrieve. This is only -- safe for trusted inputs; it reads the message with a traversal limit -- of maxBound (and so is suseptable to denial of service -- attacks), and it calls error if decoding is not successful. -- -- The purpose of this is for defining constants of pointer type from a -- schema. getPtrConst :: forall a. IsPtr a => ByteString -> Raw a 'Const -- | A space-efficient representation of a Word8 vector, supporting -- many efficient operations. -- -- A ByteString contains 8-bit bytes, or by using the operations -- from Data.ByteString.Char8 it can be interpreted as containing -- 8-bit characters. data ByteString -- | 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. -- --
--   >>> Proxy :: Proxy (Void, Int -> Int)
--   Proxy
--   
-- -- Proxy can even hold types of higher kinds, -- --
--   >>> Proxy :: Proxy Either
--   Proxy
--   
-- --
--   >>> Proxy :: Proxy Functor
--   Proxy
--   
-- --
--   >>> Proxy :: Proxy complicatedStructure
--   Proxy
--   
data Proxy (t :: k) Proxy :: Proxy (t :: k) module Capnp.Gen.Capnp.Stream data StreamResult instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Stream.StreamResult instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Stream.StreamResult instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Stream.StreamResult instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Stream.StreamResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Stream.StreamResult instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Stream.StreamResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Stream.StreamResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Stream.StreamResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.Stream.StreamResult) module Capnp.Gen.ById.X86c366a91393f3f8 module Capnp.Gen.Capnp.Schema data Node data Node'struct data Node'enum data Node'interface data Node'const data Node'annotation data Node'Parameter data Node'NestedNode data Node'SourceInfo data Node'SourceInfo'Member data Field data Field'slot data Field'group data Field'ordinal field'noDiscriminant :: Word16 data Enumerant data Superclass data Method data Type data Type'list data Type'enum data Type'struct data Type'interface data Type'anyPointer data Type'anyPointer'unconstrained data Type'anyPointer'parameter data Type'anyPointer'implicitMethodParameter data Brand data Brand'Scope data Brand'Binding data Value data Annotation data ElementSize ElementSize'empty :: ElementSize ElementSize'bit :: ElementSize ElementSize'byte :: ElementSize ElementSize'twoBytes :: ElementSize ElementSize'fourBytes :: ElementSize ElementSize'eightBytes :: ElementSize ElementSize'pointer :: ElementSize ElementSize'inlineComposite :: ElementSize ElementSize'unknown' :: Word16 -> ElementSize data CapnpVersion data CodeGeneratorRequest data CodeGeneratorRequest'RequestedFile data CodeGeneratorRequest'RequestedFile'Import instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance GHC.Generics.Generic Capnp.Gen.Capnp.Schema.ElementSize instance GHC.Show.Show Capnp.Gen.Capnp.Schema.ElementSize instance GHC.Classes.Eq Capnp.Gen.Capnp.Schema.ElementSize instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance Capnp.Fields.HasField "imports" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile (Capnp.Repr.List Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import GHC.Word.Word64 instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile'Import Capnp.Basics.Text instance Capnp.Fields.HasField "requestedFiles" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Repr.List Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile GHC.Word.Word64 instance Capnp.Fields.HasField "filename" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest'RequestedFile Capnp.Basics.Text instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.CodeGeneratorRequest instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.CodeGeneratorRequest instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.CodeGeneratorRequest instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.CodeGeneratorRequest instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CodeGeneratorRequest) instance Capnp.Fields.HasField "nodes" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Node) instance Capnp.Fields.HasField "capnpVersion" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest Capnp.Gen.Capnp.Schema.CapnpVersion instance Capnp.Fields.HasField "sourceInfo" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CodeGeneratorRequest (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.CapnpVersion instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.CapnpVersion instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.CapnpVersion instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.CapnpVersion (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.CapnpVersion instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.CapnpVersion (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.CapnpVersion (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.CapnpVersion (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.CapnpVersion) instance Capnp.Fields.HasField "major" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CapnpVersion GHC.Word.Word16 instance Capnp.Fields.HasField "minor" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CapnpVersion GHC.Word.Word8 instance Capnp.Fields.HasField "micro" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.CapnpVersion GHC.Word.Word8 instance Capnp.Fields.HasField "preferredListEncoding" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct Capnp.Gen.Capnp.Schema.ElementSize instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.ElementSize instance GHC.Enum.Enum Capnp.Gen.Capnp.Schema.ElementSize instance Capnp.Classes.IsWord Capnp.Gen.Capnp.Schema.ElementSize instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.ElementSize Capnp.Gen.Capnp.Schema.ElementSize instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.ElementSize instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.ElementSize Capnp.Gen.Capnp.Schema.ElementSize instance Capnp.Fields.HasField "annotations" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Fields.HasField "annotations" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Fields.HasField "annotations" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Enumerant (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Fields.HasField "annotations" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Annotation instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Annotation instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Annotation instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Annotation instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Annotation) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Annotation GHC.Word.Word64 instance Capnp.Fields.HasField "value" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Annotation Capnp.Gen.Capnp.Schema.Value instance Capnp.Fields.HasField "brand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Annotation Capnp.Gen.Capnp.Schema.Brand instance Capnp.Fields.HasField "value" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'const Capnp.Gen.Capnp.Schema.Value instance Capnp.Fields.HasField "defaultValue" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'slot Capnp.Gen.Capnp.Schema.Value instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Value instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Value instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Value instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Value instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Value) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Value instance Capnp.Fields.HasVariant "void" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value () instance Capnp.Fields.HasVariant "bool" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Types.Bool instance Capnp.Fields.HasVariant "int8" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Int.Int8 instance Capnp.Fields.HasVariant "int16" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Int.Int16 instance Capnp.Fields.HasVariant "int32" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Int.Int32 instance Capnp.Fields.HasVariant "int64" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Int.Int64 instance Capnp.Fields.HasVariant "uint8" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Word.Word8 instance Capnp.Fields.HasVariant "uint16" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Word.Word16 instance Capnp.Fields.HasVariant "uint32" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Word.Word32 instance Capnp.Fields.HasVariant "uint64" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Word.Word64 instance Capnp.Fields.HasVariant "float32" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Types.Float instance Capnp.Fields.HasVariant "float64" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Types.Double instance Capnp.Fields.HasVariant "text" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value Capnp.Basics.Text instance Capnp.Fields.HasVariant "data_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value Capnp.Basics.Data instance Capnp.Fields.HasVariant "list" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasVariant "enum" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value GHC.Word.Word16 instance Capnp.Fields.HasVariant "struct" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasVariant "interface" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value () instance Capnp.Fields.HasVariant "anyPointer" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Value (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Value)) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Brand'Scope instance Capnp.Fields.HasVariant "bind" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Brand'Scope (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Brand'Binding) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Brand'Binding instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Brand'Binding instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Brand'Binding instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Brand'Binding (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Brand'Binding instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Brand'Binding (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Brand'Binding (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Brand'Binding (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Binding) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Brand'Binding instance Capnp.Fields.HasVariant "unbound" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Brand'Binding () instance Capnp.Fields.HasVariant "type_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Brand'Binding Capnp.Gen.Capnp.Schema.Type instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Binding)) instance Capnp.Fields.HasField "scopes" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Brand (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Brand'Scope) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Brand'Scope instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Brand'Scope instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Brand'Scope instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Brand'Scope (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Brand'Scope instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Brand'Scope (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Brand'Scope (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Brand'Scope (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand'Scope) instance Capnp.Fields.HasVariant "inherit" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Brand'Scope () instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Brand'Scope)) instance Capnp.Fields.HasField "scopeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Brand'Scope GHC.Word.Word64 instance Capnp.Fields.HasField "brand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Superclass Capnp.Gen.Capnp.Schema.Brand instance Capnp.Fields.HasField "paramBrand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method Capnp.Gen.Capnp.Schema.Brand instance Capnp.Fields.HasField "resultBrand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method Capnp.Gen.Capnp.Schema.Brand instance Capnp.Fields.HasField "brand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'enum Capnp.Gen.Capnp.Schema.Brand instance Capnp.Fields.HasField "brand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'struct Capnp.Gen.Capnp.Schema.Brand instance Capnp.Fields.HasField "brand" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'interface Capnp.Gen.Capnp.Schema.Brand instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Brand instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Brand instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Brand instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Brand (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Brand instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Brand (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Brand (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Brand (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Brand) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Type'anyPointer instance Capnp.Fields.HasVariant "implicitMethodParameter" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type'anyPointer Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter) instance Capnp.Fields.HasField "parameterIndex" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'implicitMethodParameter GHC.Word.Word16 instance Capnp.Fields.HasVariant "parameter" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type'anyPointer Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter) instance Capnp.Fields.HasField "scopeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter GHC.Word.Word64 instance Capnp.Fields.HasField "parameterIndex" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'parameter GHC.Word.Word16 instance Capnp.Fields.HasVariant "unconstrained" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type'anyPointer Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained instance Capnp.Fields.HasVariant "anyKind" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained () instance Capnp.Fields.HasVariant "struct" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained () instance Capnp.Fields.HasVariant "list" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained () instance Capnp.Fields.HasVariant "capability" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained () instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer'unconstrained)) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Type instance Capnp.Fields.HasVariant "anyPointer" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type Capnp.Gen.Capnp.Schema.Type'anyPointer instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'anyPointer instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'anyPointer instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'anyPointer instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'anyPointer instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'anyPointer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'anyPointer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'anyPointer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'anyPointer) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type'anyPointer)) instance Capnp.Fields.HasVariant "interface" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type Capnp.Gen.Capnp.Schema.Type'interface instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'interface instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'interface instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'interface instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'interface instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'interface) instance Capnp.Fields.HasField "typeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'interface GHC.Word.Word64 instance Capnp.Fields.HasVariant "struct" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type Capnp.Gen.Capnp.Schema.Type'struct instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'struct instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'struct instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'struct instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'struct instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'struct) instance Capnp.Fields.HasField "typeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'struct GHC.Word.Word64 instance Capnp.Fields.HasVariant "enum" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type Capnp.Gen.Capnp.Schema.Type'enum instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'enum instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'enum instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'enum instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'enum instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'enum) instance Capnp.Fields.HasField "typeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'enum GHC.Word.Word64 instance Capnp.Fields.HasVariant "list" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Type Capnp.Gen.Capnp.Schema.Type'list instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type'list instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type'list instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type'list instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type'list (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type'list instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type'list (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type'list (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type'list (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type'list) instance Capnp.Fields.HasField "elementType" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type'list Capnp.Gen.Capnp.Schema.Type instance Capnp.Fields.HasField "type_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'const Capnp.Gen.Capnp.Schema.Type instance Capnp.Fields.HasField "type_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation Capnp.Gen.Capnp.Schema.Type instance Capnp.Fields.HasField "type_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'slot Capnp.Gen.Capnp.Schema.Type instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Type instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Type instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Type instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Type (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Type instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Type (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Type (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Type (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Type) instance Capnp.Fields.HasVariant "void" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "bool" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "int8" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "int16" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "int32" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "int64" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "uint8" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "uint16" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "uint32" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "uint64" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "float32" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "float64" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "text" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Fields.HasVariant "data_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Type () instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Type)) instance Capnp.Fields.HasField "methods" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'interface (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Method) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Method instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Method instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Method instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Method (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Method instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Method (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Method (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Method (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Method) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method Capnp.Basics.Text instance Capnp.Fields.HasField "codeOrder" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method GHC.Word.Word16 instance Capnp.Fields.HasField "paramStructType" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method GHC.Word.Word64 instance Capnp.Fields.HasField "resultStructType" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method GHC.Word.Word64 instance Capnp.Fields.HasField "implicitParameters" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Method (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Node'Parameter) instance Capnp.Fields.HasField "superclasses" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'interface (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Superclass) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Superclass instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Superclass instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Superclass instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Superclass (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Superclass instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Superclass (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Superclass (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Superclass (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Superclass) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Superclass GHC.Word.Word64 instance Capnp.Fields.HasField "enumerants" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'enum (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Enumerant) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Enumerant instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Enumerant instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Enumerant instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Enumerant (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Enumerant instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Enumerant (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Enumerant (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Enumerant (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Enumerant) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Enumerant Capnp.Basics.Text instance Capnp.Fields.HasField "codeOrder" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Enumerant GHC.Word.Word16 instance Capnp.Fields.HasField "ordinal" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Field Capnp.Gen.Capnp.Schema.Field'ordinal instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Field'ordinal instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Field'ordinal instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Field'ordinal instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Field'ordinal (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Field'ordinal instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Field'ordinal (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Field'ordinal (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Field'ordinal (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'ordinal) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Field'ordinal instance Capnp.Fields.HasVariant "implicit" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'ordinal () instance Capnp.Fields.HasVariant "explicit" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'ordinal GHC.Word.Word16 instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field'ordinal)) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Field instance Capnp.Fields.HasVariant "group" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Field Capnp.Gen.Capnp.Schema.Field'group instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Field'group instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Field'group instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Field'group instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Field'group (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Field'group instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Field'group (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Field'group (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Field'group (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'group) instance Capnp.Fields.HasField "typeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'group GHC.Word.Word64 instance Capnp.Fields.HasVariant "slot" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Field Capnp.Gen.Capnp.Schema.Field'slot instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Field'slot instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Field'slot instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Field'slot instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Field'slot (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Field'slot instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Field'slot (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Field'slot (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Field'slot (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field'slot) instance Capnp.Fields.HasField "offset" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'slot GHC.Word.Word32 instance Capnp.Fields.HasField "hadExplicitDefault" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field'slot GHC.Types.Bool instance Capnp.Fields.HasField "fields" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Field) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Field instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Field instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Field instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Field instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Field) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Field)) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field Capnp.Basics.Text instance Capnp.Fields.HasField "codeOrder" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field GHC.Word.Word16 instance Capnp.Fields.HasField "discriminantValue" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Field GHC.Word.Word16 instance Capnp.Fields.HasField "members" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'SourceInfo (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member) instance Capnp.Fields.HasField "docComment" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'SourceInfo'Member Capnp.Basics.Text instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'SourceInfo instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'SourceInfo instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'SourceInfo instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'SourceInfo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'SourceInfo instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'SourceInfo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'SourceInfo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'SourceInfo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'SourceInfo) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'SourceInfo GHC.Word.Word64 instance Capnp.Fields.HasField "docComment" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'SourceInfo Capnp.Basics.Text instance Capnp.Fields.HasField "nestedNodes" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Node'NestedNode) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'NestedNode instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'NestedNode instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'NestedNode instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'NestedNode (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'NestedNode instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'NestedNode (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'NestedNode (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'NestedNode (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'NestedNode) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'NestedNode Capnp.Basics.Text instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'NestedNode GHC.Word.Word64 instance Capnp.Fields.HasField "parameters" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node (Capnp.Repr.List Capnp.Gen.Capnp.Schema.Node'Parameter) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'Parameter instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'Parameter instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'Parameter instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'Parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'Parameter instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'Parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'Parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'Parameter (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'Parameter) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'Parameter Capnp.Basics.Text instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Schema.Node instance Capnp.Fields.HasVariant "annotation" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Node Capnp.Gen.Capnp.Schema.Node'annotation instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'annotation instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'annotation instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'annotation instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'annotation instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'annotation (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'annotation) instance Capnp.Fields.HasField "targetsFile" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsConst" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsEnum" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsEnumerant" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsStruct" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsField" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsUnion" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsGroup" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsInterface" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsMethod" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsParam" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasField "targetsAnnotation" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'annotation GHC.Types.Bool instance Capnp.Fields.HasVariant "const" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Node Capnp.Gen.Capnp.Schema.Node'const instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'const instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'const instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'const instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'const (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'const instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'const (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'const (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'const (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'const) instance Capnp.Fields.HasVariant "interface" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Node Capnp.Gen.Capnp.Schema.Node'interface instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'interface instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'interface instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'interface instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'interface instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'interface (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'interface) instance Capnp.Fields.HasVariant "enum" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Node Capnp.Gen.Capnp.Schema.Node'enum instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'enum instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'enum instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'enum instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'enum instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'enum (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'enum) instance Capnp.Fields.HasVariant "struct" 'Capnp.Fields.Group Capnp.Gen.Capnp.Schema.Node Capnp.Gen.Capnp.Schema.Node'struct instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node'struct instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node'struct instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node'struct instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node'struct instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node'struct (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node'struct) instance Capnp.Fields.HasField "dataWordCount" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct GHC.Word.Word16 instance Capnp.Fields.HasField "pointerCount" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct GHC.Word.Word16 instance Capnp.Fields.HasField "isGroup" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct GHC.Types.Bool instance Capnp.Fields.HasField "discriminantCount" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct GHC.Word.Word16 instance Capnp.Fields.HasField "discriminantOffset" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node'struct GHC.Word.Word32 instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Schema.Node instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Schema.Node instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Schema.Node instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Schema.Node (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Schema.Node instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Schema.Node (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Schema.Node (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Schema.Node (Capnp.Classes.Parsed Capnp.Gen.Capnp.Schema.Node) instance Capnp.Fields.HasVariant "file" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node () instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Schema.Node)) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node GHC.Word.Word64 instance Capnp.Fields.HasField "displayName" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node Capnp.Basics.Text instance Capnp.Fields.HasField "displayNamePrefixLength" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node GHC.Word.Word32 instance Capnp.Fields.HasField "scopeId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node GHC.Word.Word64 instance Capnp.Fields.HasField "isGeneric" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Schema.Node GHC.Types.Bool module Capnp.Gen.ById.Xa93fc509624c72d9 module Capnp.Gen.Capnp.RpcTwoparty data Side Side'server :: Side Side'client :: Side Side'unknown' :: Word16 -> Side data VatId data ProvisionId data RecipientId data ThirdPartyCapId data JoinKeyPart data JoinResult instance GHC.Generics.Generic Capnp.Gen.Capnp.RpcTwoparty.Side instance GHC.Show.Show Capnp.Gen.Capnp.RpcTwoparty.Side instance GHC.Classes.Eq Capnp.Gen.Capnp.RpcTwoparty.Side instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.JoinResult instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.RpcTwoparty.JoinResult instance Capnp.Classes.Allocate Capnp.Gen.Capnp.RpcTwoparty.JoinResult instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.RpcTwoparty.JoinResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.JoinResult instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.JoinResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.JoinResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.RpcTwoparty.JoinResult (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinResult) instance Capnp.Fields.HasField "joinId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.JoinResult GHC.Word.Word32 instance Capnp.Fields.HasField "succeeded" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.JoinResult GHC.Types.Bool instance Capnp.Fields.HasField "cap" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.JoinResult (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart instance Capnp.Classes.Allocate Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart) instance Capnp.Fields.HasField "joinId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart GHC.Word.Word32 instance Capnp.Fields.HasField "partCount" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart GHC.Word.Word16 instance Capnp.Fields.HasField "partNum" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.JoinKeyPart GHC.Word.Word16 instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId instance Capnp.Classes.Allocate Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ThirdPartyCapId) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.RecipientId instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.RpcTwoparty.RecipientId instance Capnp.Classes.Allocate Capnp.Gen.Capnp.RpcTwoparty.RecipientId instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.RpcTwoparty.RecipientId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.RecipientId instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.RecipientId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.RecipientId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.RpcTwoparty.RecipientId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.RecipientId) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.ProvisionId instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.RpcTwoparty.ProvisionId instance Capnp.Classes.Allocate Capnp.Gen.Capnp.RpcTwoparty.ProvisionId instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.RpcTwoparty.ProvisionId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.ProvisionId instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.ProvisionId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.ProvisionId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.RpcTwoparty.ProvisionId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.ProvisionId) instance Capnp.Fields.HasField "joinId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.ProvisionId GHC.Word.Word32 instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.VatId instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.RpcTwoparty.VatId instance Capnp.Classes.Allocate Capnp.Gen.Capnp.RpcTwoparty.VatId instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.RpcTwoparty.VatId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.VatId instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.VatId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.VatId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.RpcTwoparty.VatId (Capnp.Classes.Parsed Capnp.Gen.Capnp.RpcTwoparty.VatId) instance Capnp.Fields.HasField "side" 'Capnp.Fields.Slot Capnp.Gen.Capnp.RpcTwoparty.VatId Capnp.Gen.Capnp.RpcTwoparty.Side instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.RpcTwoparty.Side instance GHC.Enum.Enum Capnp.Gen.Capnp.RpcTwoparty.Side instance Capnp.Classes.IsWord Capnp.Gen.Capnp.RpcTwoparty.Side instance Capnp.Classes.Parse Capnp.Gen.Capnp.RpcTwoparty.Side Capnp.Gen.Capnp.RpcTwoparty.Side instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.RpcTwoparty.Side instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.RpcTwoparty.Side Capnp.Gen.Capnp.RpcTwoparty.Side module Capnp.Gen.ById.Xa184c7885cdaf2a1 module Capnp.Gen.Capnp.Rpc data Message data Bootstrap data Call data Call'sendResultsTo data Return data Finish data Resolve data Release data Disembargo data Disembargo'context data Provide data Accept data Join data MessageTarget data Payload data CapDescriptor data PromisedAnswer data PromisedAnswer'Op data ThirdPartyCapDescriptor data Exception data Exception'Type Exception'Type'failed :: Exception'Type Exception'Type'overloaded :: Exception'Type Exception'Type'disconnected :: Exception'Type Exception'Type'unimplemented :: Exception'Type Exception'Type'unknown' :: Word16 -> Exception'Type instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op)) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message)) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return)) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve)) instance GHC.Generics.Generic Capnp.Gen.Capnp.Rpc.Exception'Type instance GHC.Show.Show Capnp.Gen.Capnp.Rpc.Exception'Type instance GHC.Classes.Eq Capnp.Gen.Capnp.Rpc.Exception'Type instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance Capnp.Fields.HasField "type_" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Exception Capnp.Gen.Capnp.Rpc.Exception'Type instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Exception'Type instance GHC.Enum.Enum Capnp.Gen.Capnp.Rpc.Exception'Type instance Capnp.Classes.IsWord Capnp.Gen.Capnp.Rpc.Exception'Type instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Exception'Type Capnp.Gen.Capnp.Rpc.Exception'Type instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Exception'Type instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Exception'Type Capnp.Gen.Capnp.Rpc.Exception'Type instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.Message instance Capnp.Fields.HasVariant "abort" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.Return instance Capnp.Fields.HasVariant "exception" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.Resolve instance Capnp.Fields.HasVariant "exception" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Resolve Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Exception (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Exception instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Exception (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Exception (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Exception (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) instance Capnp.Fields.HasField "reason" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Exception Capnp.Basics.Text instance Capnp.Fields.HasField "obsoleteIsCallersFault" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Exception GHC.Types.Bool instance Capnp.Fields.HasField "obsoleteDurability" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Exception GHC.Word.Word16 instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.CapDescriptor instance Capnp.Fields.HasVariant "thirdPartyHosted" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasField "vineId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.ThirdPartyCapDescriptor GHC.Word.Word32 instance Capnp.Fields.HasField "transform" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.PromisedAnswer (Capnp.Repr.List Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op instance Capnp.Fields.HasVariant "noop" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op () instance Capnp.Fields.HasVariant "getPointerField" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op GHC.Word.Word16 instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.PromisedAnswer'Op)) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Fields.HasVariant "promisedAnswer" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.MessageTarget Capnp.Gen.Capnp.Rpc.PromisedAnswer instance Capnp.Fields.HasVariant "receiverAnswer" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor Capnp.Gen.Capnp.Rpc.PromisedAnswer instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.PromisedAnswer instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.PromisedAnswer instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.PromisedAnswer instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.PromisedAnswer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.PromisedAnswer instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.PromisedAnswer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.PromisedAnswer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.PromisedAnswer (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.PromisedAnswer) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.PromisedAnswer GHC.Word.Word32 instance Capnp.Fields.HasVariant "cap" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Resolve Capnp.Gen.Capnp.Rpc.CapDescriptor instance Capnp.Fields.HasField "capTable" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Payload (Capnp.Repr.List Capnp.Gen.Capnp.Rpc.CapDescriptor) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.CapDescriptor instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.CapDescriptor instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.CapDescriptor instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.CapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.CapDescriptor instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.CapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.CapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.CapDescriptor (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.CapDescriptor) instance Capnp.Fields.HasVariant "none" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor () instance Capnp.Fields.HasVariant "senderHosted" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor GHC.Word.Word32 instance Capnp.Fields.HasVariant "senderPromise" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor GHC.Word.Word32 instance Capnp.Fields.HasVariant "receiverHosted" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor GHC.Word.Word32 instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.CapDescriptor)) instance Capnp.Fields.HasField "attachedFd" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.CapDescriptor GHC.Word.Word8 instance Capnp.Fields.HasField "params" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call Capnp.Gen.Capnp.Rpc.Payload instance Capnp.Fields.HasVariant "results" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return Capnp.Gen.Capnp.Rpc.Payload instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Payload instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Payload instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Payload instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Payload (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Payload instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Payload (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Payload (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Payload (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Payload) instance Capnp.Fields.HasField "content" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Payload (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasField "target" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Fields.HasField "target" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Disembargo Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Fields.HasField "target" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Provide Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Fields.HasField "target" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Join Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.MessageTarget (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.MessageTarget instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.MessageTarget (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.MessageTarget (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.MessageTarget (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.MessageTarget) instance Capnp.Fields.HasVariant "importedCap" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.MessageTarget GHC.Word.Word32 instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.MessageTarget)) instance Capnp.Fields.HasVariant "join" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Join instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Join instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Join instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Join instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Join (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Join instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Join (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Join (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Join (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Join) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Join GHC.Word.Word32 instance Capnp.Fields.HasField "keyPart" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Join (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasVariant "accept" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Accept instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Accept instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Accept instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Accept instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Accept (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Accept instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Accept (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Accept (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Accept (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Accept) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Accept GHC.Word.Word32 instance Capnp.Fields.HasField "provision" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Accept (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasField "embargo" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Accept GHC.Types.Bool instance Capnp.Fields.HasVariant "provide" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Provide instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Provide instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Provide instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Provide instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Provide (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Provide instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Provide (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Provide (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Provide (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Provide) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Provide GHC.Word.Word32 instance Capnp.Fields.HasField "recipient" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Provide (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasField "context" 'Capnp.Fields.Group Capnp.Gen.Capnp.Rpc.Disembargo Capnp.Gen.Capnp.Rpc.Disembargo'context instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Disembargo'context instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Disembargo'context instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Disembargo'context instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Disembargo'context (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Disembargo'context instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Disembargo'context (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Disembargo'context (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Disembargo'context (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo'context) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.Disembargo'context instance Capnp.Fields.HasVariant "senderLoopback" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Disembargo'context GHC.Word.Word32 instance Capnp.Fields.HasVariant "receiverLoopback" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Disembargo'context GHC.Word.Word32 instance Capnp.Fields.HasVariant "accept" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Disembargo'context () instance Capnp.Fields.HasVariant "provide" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Disembargo'context GHC.Word.Word32 instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Disembargo'context)) instance Capnp.Fields.HasVariant "disembargo" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Disembargo instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Disembargo instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Disembargo instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Disembargo instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Disembargo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Disembargo instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Disembargo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Disembargo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Disembargo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Disembargo) instance Capnp.Fields.HasVariant "release" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Release instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Release instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Release instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Release instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Release (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Release instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Release (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Release (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Release (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Release) instance Capnp.Fields.HasField "id" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Release GHC.Word.Word32 instance Capnp.Fields.HasField "referenceCount" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Release GHC.Word.Word32 instance Capnp.Fields.HasVariant "resolve" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Resolve instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Resolve instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Resolve instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Resolve instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Resolve (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Resolve instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Resolve (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Resolve (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Resolve (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Resolve) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Resolve)) instance Capnp.Fields.HasField "promiseId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Resolve GHC.Word.Word32 instance Capnp.Fields.HasVariant "finish" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Finish instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Finish instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Finish instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Finish instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Finish (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Finish instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Finish (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Finish (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Finish (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Finish) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Finish GHC.Word.Word32 instance Capnp.Fields.HasField "releaseResultCaps" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Finish GHC.Types.Bool instance Capnp.Fields.HasVariant "return" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Return instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Return instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Return instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Return instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Return (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Return instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Return (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Return (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Return (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Return) instance Capnp.Fields.HasVariant "canceled" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return () instance Capnp.Fields.HasVariant "resultsSentElsewhere" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return () instance Capnp.Fields.HasVariant "takeFromOtherQuestion" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return GHC.Word.Word32 instance Capnp.Fields.HasVariant "acceptFromThirdParty" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Return)) instance Capnp.Fields.HasField "answerId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return GHC.Word.Word32 instance Capnp.Fields.HasField "releaseParamCaps" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Return GHC.Types.Bool instance Capnp.Fields.HasField "sendResultsTo" 'Capnp.Fields.Group Capnp.Gen.Capnp.Rpc.Call Capnp.Gen.Capnp.Rpc.Call'sendResultsTo instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Call'sendResultsTo instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Call'sendResultsTo instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Call'sendResultsTo instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Call'sendResultsTo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Call'sendResultsTo instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Call'sendResultsTo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Call'sendResultsTo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Call'sendResultsTo (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Rpc.Call'sendResultsTo instance Capnp.Fields.HasVariant "caller" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call'sendResultsTo () instance Capnp.Fields.HasVariant "yourself" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call'sendResultsTo () instance Capnp.Fields.HasVariant "thirdParty" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call'sendResultsTo (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Call'sendResultsTo)) instance Capnp.Fields.HasVariant "call" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Call instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Call instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Call instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Call instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Call instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Call) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call GHC.Word.Word32 instance Capnp.Fields.HasField "interfaceId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call GHC.Word.Word64 instance Capnp.Fields.HasField "methodId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call GHC.Word.Word16 instance Capnp.Fields.HasField "allowThirdPartyTailCall" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Call GHC.Types.Bool instance Capnp.Fields.HasVariant "bootstrap" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Bootstrap instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Bootstrap instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Bootstrap instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Bootstrap instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Bootstrap (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Bootstrap instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Bootstrap (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Bootstrap (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Bootstrap (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Bootstrap) instance Capnp.Fields.HasField "questionId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Bootstrap GHC.Word.Word32 instance Capnp.Fields.HasField "deprecatedObjectId" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Bootstrap (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Rpc.Message instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Rpc.Message instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Rpc.Message instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Rpc.Message (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Rpc.Message instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Rpc.Message (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Rpc.Message (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Rpc.Message (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Message) instance Capnp.Fields.HasVariant "unimplemented" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message Capnp.Gen.Capnp.Rpc.Message instance Capnp.Fields.HasVariant "obsoleteSave" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Fields.HasVariant "obsoleteDelete" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Rpc.Message (GHC.Maybe.Maybe Capnp.Basics.AnyPointer) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Rpc.Message)) -- | This module provides a Transport type, which provides -- operations used to transmit messages between vats in the RPC protocol. module Capnp.Rpc.Transport -- | A Transport handles transmitting RPC messages. data Transport Transport :: (Message 'Const -> IO ()) -> IO (Message 'Const) -> Transport -- | Send a message [$sel:sendMsg:Transport] :: Transport -> Message 'Const -> IO () -- | Receive a message [$sel:recvMsg:Transport] :: Transport -> IO (Message 'Const) -- | handleTransport handle limit is a transport which -- reads and writes messages from/to handle. It uses -- limit as the traversal limit when reading messages and -- decoding. handleTransport :: Handle -> WordCount -> Transport -- | socketTransport socket limit is a transport which -- reads and writes messages to/from a socket. It uses limit as -- the traversal limit when reading messages and decoing. socketTransport :: Socket -> WordCount -> Transport -- | tracingTransport log trans wraps another transport -- trans, loging messages when they are sent or received (using -- the log function). This can be useful for debugging. tracingTransport :: TraceConfig -> Transport -> Transport data TraceConfig TraceConfig :: (String -> IO ()) -> !Bool -> TraceConfig [$sel:log:TraceConfig] :: TraceConfig -> String -> IO () [$sel:showPayloads:TraceConfig] :: TraceConfig -> !Bool -- | In addition to the values exposed in the API, this module also defines -- an instance of Haskell's Exception type class, for Cap'n -- Proto's Exception. module Capnp.Rpc.Errors -- | wrapException debugMode e converts an arbitrary -- haskell exception e into an rpc exception, which can be -- communicated to a remote vat. If debugMode is true, the -- returned exception's reason field will include the text of show -- e. wrapException :: Bool -> SomeException -> Parsed Exception -- | An exception indicating an unimplemented method. eMethodUnimplemented :: Parsed Exception -- | An unimplemented exception with a custom reason message. eUnimplemented :: Text -> Parsed Exception -- | An exception with type = disconnected eDisconnected :: Parsed Exception -- | Construct an exception with a type field of failed and the given text -- as its reason. eFailed :: Text -> Parsed Exception -- | Throw an exception with a type field of Exception'Type'failed -- and the argument as a reason. throwFailed :: MonadThrow m => Text -> m a instance GHC.Exception.Type.Exception (Capnp.Classes.Parsed Capnp.Gen.Capnp.Rpc.Exception) -- | This module defines a Promise type, represents a value which is -- not yet available, and related utilities. module Capnp.Rpc.Promise -- | A promise is a value that may not be ready yet. data Promise a -- | A Fulfiller is used to fulfill a promise. data Fulfiller a -- | Create a new promise and an associated fulfiller. newPromise :: MonadSTM m => m (Promise a, Fulfiller a) -- | Create a promise that is already fulfilled, with the given value. newReadyPromise :: MonadSTM m => a -> m (Promise a) -- | Create a new promise which also excecutes an STM action when it is -- resolved. newPromiseWithCallback :: MonadSTM m => (Either (Parsed Exception) a -> STM ()) -> m (Promise a, Fulfiller a) -- | Like newPromiseWithCallback, but doesn't return the promise. newCallback :: MonadSTM m => (Either (Parsed Exception) a -> STM ()) -> m (Fulfiller a) -- | Fulfill a promise by supplying the specified value. It is an error to -- call fulfill if the promise has already been fulfilled (or -- broken). fulfill :: MonadSTM m => Fulfiller a -> a -> m () -- | Break a promise. When the user of the promise executes wait, -- the specified exception will be raised. It is an error to call -- breakPromise if the promise has already been fulfilled (or -- broken). breakPromise :: MonadSTM m => Fulfiller a -> Parsed Exception -> m () -- | breakOrFulfill calls either breakPromise or -- fulfill, depending on the argument. breakOrFulfill :: MonadSTM m => Fulfiller a -> Either (Parsed Exception) a -> m () -- | An exception thrown if breakPromise or fulfill is called -- on an already-resolved fulfiller. data ErrAlreadyResolved ErrAlreadyResolved :: ErrAlreadyResolved -- | Wait for a promise to resolve, and return the result. If the promise -- is broken, this raises an exception instead (see breakPromise). wait :: MonadSTM m => Promise a -> m a instance GHC.Show.Show Capnp.Rpc.Promise.ErrAlreadyResolved instance GHC.Classes.Eq (Capnp.Rpc.Promise.Promise a) instance GHC.Exception.Type.Exception Capnp.Rpc.Promise.ErrAlreadyResolved module Capnp.Gen.ById.Xb312981b2552a250 module Capnp.Gen.Capnp.Cxx module Capnp.Gen.ById.Xbdf87d7bb8304e81 module Capnp.Gen.Capnp.Compat.Json data Value data Value'Field data Value'Call data FlattenOptions data DiscriminatorOptions instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value)) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance GHC.Generics.Generic (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value)) instance GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value)) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance GHC.Show.Show (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance GHC.Classes.Eq (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions Capnp.Basics.Text instance Capnp.Fields.HasField "valueName" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.DiscriminatorOptions Capnp.Basics.Text instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Compat.Json.FlattenOptions instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Compat.Json.FlattenOptions instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Compat.Json.FlattenOptions instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Compat.Json.FlattenOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Compat.Json.FlattenOptions instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Compat.Json.FlattenOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Compat.Json.FlattenOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Compat.Json.FlattenOptions (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.FlattenOptions) instance Capnp.Fields.HasField "prefix" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.FlattenOptions Capnp.Basics.Text instance Capnp.Fields.HasUnion Capnp.Gen.Capnp.Compat.Json.Value instance Capnp.Fields.HasVariant "call" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value Capnp.Gen.Capnp.Compat.Json.Value'Call instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Compat.Json.Value'Call instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Compat.Json.Value'Call instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Compat.Json.Value'Call instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Compat.Json.Value'Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Compat.Json.Value'Call instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Compat.Json.Value'Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Compat.Json.Value'Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Compat.Json.Value'Call (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Call) instance Capnp.Fields.HasField "function" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value'Call Capnp.Basics.Text instance Capnp.Fields.HasField "params" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value'Call (Capnp.Repr.List Capnp.Gen.Capnp.Compat.Json.Value) instance Capnp.Fields.HasVariant "object" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value (Capnp.Repr.List Capnp.Gen.Capnp.Compat.Json.Value'Field) instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Compat.Json.Value'Field instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Compat.Json.Value'Field instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Compat.Json.Value'Field instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Compat.Json.Value'Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Compat.Json.Value'Field instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Compat.Json.Value'Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Compat.Json.Value'Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Compat.Json.Value'Field (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value'Field) instance Capnp.Fields.HasField "name" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value'Field Capnp.Basics.Text instance Capnp.Fields.HasField "value" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value'Field Capnp.Gen.Capnp.Compat.Json.Value instance Capnp.Classes.HasTypeId Capnp.Gen.Capnp.Compat.Json.Value instance Capnp.Classes.TypedStruct Capnp.Gen.Capnp.Compat.Json.Value instance Capnp.Classes.Allocate Capnp.Gen.Capnp.Compat.Json.Value instance Capnp.Classes.EstimateAlloc Capnp.Gen.Capnp.Compat.Json.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance Capnp.Classes.AllocateList Capnp.Gen.Capnp.Compat.Json.Value instance Capnp.Classes.EstimateListAlloc Capnp.Gen.Capnp.Compat.Json.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance Capnp.Classes.Parse Capnp.Gen.Capnp.Compat.Json.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance Capnp.Classes.Marshal Capnp.Gen.Capnp.Compat.Json.Value (Capnp.Classes.Parsed Capnp.Gen.Capnp.Compat.Json.Value) instance Capnp.Fields.HasVariant "null" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value () instance Capnp.Fields.HasVariant "boolean" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value GHC.Types.Bool instance Capnp.Fields.HasVariant "number" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value GHC.Types.Double instance Capnp.Fields.HasVariant "string" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value Capnp.Basics.Text instance Capnp.Fields.HasVariant "array" 'Capnp.Fields.Slot Capnp.Gen.Capnp.Compat.Json.Value (Capnp.Repr.List Capnp.Gen.Capnp.Compat.Json.Value) instance Capnp.Classes.Parse (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value)) instance Capnp.Classes.Marshal (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value) (Capnp.Classes.Parsed (Capnp.Fields.Which Capnp.Gen.Capnp.Compat.Json.Value)) module Capnp.Gen.ById.X8ef99297a43a5e34 -- | Capnproto message canonicalization, per: -- -- https://capnproto.org/encoding.html#canonicalization module Capnp.Canonicalize -- | Return a canonicalized message with a copy of the given struct as its -- root. returns a (message, segment) pair, where the segment is the -- first and only segment of the returned message. -- -- In addition to the usual reasons for failure when reading a message -- (traversal limit, malformed messages), this can fail if the message -- does not fit in a single segment, as the canonical form requires -- single-segment messages. canonicalize :: RWCtx m s => Struct 'Const -> m (Message ('Mut s), Segment ('Mut s)) canonicalizeMut :: RWCtx m s => Struct ('Mut s) -> m (Message ('Mut s), Segment ('Mut s)) -- | The term server in this context refers to a thread that handles method -- calls for a particular capability (The capnproto rpc protocol itself -- has no concept of clients and servers). module Capnp.Rpc.Server -- | Base class for things that can act as capnproto servers. class Server a -- | Called when the last live reference to a server is dropped. shutdown :: Server a => a -> IO () -- | Try to extract a value of a given type. The default implementation -- always fails (returns Nothing). If an instance chooses to -- implement this, it will be possible to use "reflection" on clients -- that point at local servers to dynamically unwrap the server value. A -- typical implementation will just call Typeable's cast method, -- but this needn't be the case -- a server may wish to allow local peers -- to unwrap some value that is not exactly the data the server has -- access to. unwrap :: (Server a, Typeable b) => a -> Maybe b -- | The operations necessary to receive and handle method calls, i.e. to -- implement an object. It is parametrized over the monadic context in -- which methods are serviced. data ServerOps ServerOps :: (Word64 -> Word16 -> MethodHandler (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const))) -> IO () -> (forall a. Typeable a => Maybe a) -> ServerOps -- | Handle a method call; takes the interface and method id and returns a -- handler for the specific method. [handleCall] :: ServerOps -> Word64 -> Word16 -> MethodHandler (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const)) -- | Handle shutting-down the receiver; this is called when the last -- reference to the capability is dropped. [handleStop] :: ServerOps -> IO () -- | used to unwrap the server when reflecting on a local client. [handleCast] :: ServerOps -> forall a. Typeable a => Maybe a -- | A CallInfo contains information about a method call. data CallInfo CallInfo :: !Word64 -> !Word16 -> Maybe (Ptr 'Const) -> Fulfiller (Maybe (Ptr 'Const)) -> CallInfo -- | The id of the interface whose method is being called. [interfaceId] :: CallInfo -> !Word64 -- | The method id of the method being called. [methodId] :: CallInfo -> !Word16 -- | The arguments to the method call. [arguments] :: CallInfo -> Maybe (Ptr 'Const) -- | A Fulfiller which accepts the method's return value. [response] :: CallInfo -> Fulfiller (Maybe (Ptr 'Const)) -- | Handle incoming messages for a given object. -- -- Accepts a queue of messages to handle, and ServerOps used to -- handle them. returns when it receives a Stop message. runServer :: Q CallInfo -> ServerOps -> IO () -- | a MethodHandler p r handles a method call with -- parameters p and return type r. -- -- The library represents method handlers via an abstract type -- MethodHandler, parametrized over parameter (p) and -- return (r) types, and the monadic context in which it runs -- (m). This allows us to provide different strategies for -- actually handling methods; there are various helper functions which -- construct these handlers. -- -- At some point we will likely additionally provide handlers affording: -- -- data MethodHandler p r -- | Alias for a MethodHandler whose parameter and return types are -- untyped pointers. type UntypedMethodHandler = MethodHandler (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const)) handleUntypedMethod :: UntypedMethodHandler -> Maybe (Ptr 'Const) -> Fulfiller (Maybe (Ptr 'Const)) -> IO () -- | Construct a method handler from a function accepting an untyped -- pointer for the method's parameter, and a Fulfiller which -- accepts an untyped pointer for the method's return value. untypedHandler :: (Maybe (Ptr 'Const) -> Fulfiller (Maybe (Ptr 'Const)) -> IO ()) -> MethodHandler (Maybe (Ptr 'Const)) (Maybe (Ptr 'Const)) -- | Convert a MethodHandler for any parameter and return types into -- one that deals with untyped pointers. toUntypedHandler :: MethodHandler p r -> UntypedMethodHandler -- | Inverse of toUntypedHandler fromUntypedHandler :: UntypedMethodHandler -> MethodHandler p r -- | This module does not deal with schema-level concepts; all -- capabilities, methods etc. as used here are untyped. module Capnp.Rpc.Untyped -- | Configuration information for a connection. data ConnConfig ConnConfig :: !Word32 -> !Word32 -> !WordCount -> !Bool -> (Supervisor -> STM (Maybe Client)) -> Maybe (Supervisor -> Client -> IO ()) -> ConnConfig -- | The maximum number of simultanious outstanding requests to the peer -- vat. Once this limit is reached, further questsions will block until -- some of the existing questions have been answered. -- -- Defaults to 128. [$sel:maxQuestions:ConnConfig] :: ConnConfig -> !Word32 -- | The maximum number of objects which may be exported on this -- connection. -- -- Defaults to 8192. [$sel:maxExports:ConnConfig] :: ConnConfig -> !Word32 -- | The maximum total size of outstanding call messages that will be -- accepted; if this limit is reached, the implementation will not read -- more messages from the connection until some calls have completed and -- freed up enough space. -- -- Defaults to 32MiB in words. [$sel:maxCallWords:ConnConfig] :: ConnConfig -> !WordCount -- | In debug mode, errors reported by the RPC system to its peers will -- contain extra information. This should not be used in production, as -- it is possible for these messages to contain sensitive information, -- but it can be useful for debugging. -- -- Defaults to False. [$sel:debugMode:ConnConfig] :: ConnConfig -> !Bool -- | Get the bootstrap interface we should serve for this connection. the -- argument is a supervisor whose lifetime is bound to the connection. If -- $sel:getBootstrap:ConnConfig returns Nothing, we will -- respond to bootstrap messages with an exception. -- -- The default always returns Nothing. -- -- $sel:getBootstrap:ConnConfig MUST NOT block; the connection -- will not be serviced and $sel:withBootstrap:ConnConfig will not -- be run until this returns. If you need to supply the bootstrap -- interface later, use newPromiseClient. [$sel:getBootstrap:ConnConfig] :: ConnConfig -> Supervisor -> STM (Maybe Client) -- | An action to perform with access to the remote vat's bootstrap -- interface. The supervisor argument is bound to the lifetime of the -- connection. If this is Nothing (the default), the bootstrap -- interface will not be requested. [$sel:withBootstrap:ConnConfig] :: ConnConfig -> Maybe (Supervisor -> Client -> IO ()) -- | Handle a connection to another vat. Returns when the connection is -- closed. handleConn :: Transport -> ConnConfig -> IO () -- | A reference to a capability, which may be live either in the current -- vat or elsewhere. Holding a client affords making method calls on a -- capability or modifying the local vat's reference count to it. data Client -- | Queue a call on a client. call :: MonadSTM m => CallInfo -> Client -> m (Promise Pipeline) -- | A null client. This is the only client value that can be represented -- statically. Throws exceptions in response to all method calls. nullClient :: Client -- | Create a new client based on a promise. The fulfiller can be used to -- supply the final client. newPromiseClient :: (MonadSTM m, IsClient c) => m (c, Fulfiller c) -- | Types which may be converted to and from Clients. Typically -- these will be simple type wrappers for capabilities. class IsClient a -- | Convert a value to a client. toClient :: IsClient a => a -> Client -- | Convert a client to a value. fromClient :: IsClient a => Client -> a -- | A Pipeline is a reference to a value within a message that has -- not yet arrived. data Pipeline -- | walkPipleinePtr follows a pointer starting from the object -- referred to by the Pipeline. The Pipeline must refer to -- a struct, and the pointer is referred to by its index into the -- struct's pointer section. walkPipelinePtr :: Pipeline -> Word16 -> Pipeline -- | Convert a Pipeline into a Client, which can be used to -- send messages to the referant of the Pipeline, using promise -- pipelining. pipelineClient :: MonadSTM m => Pipeline -> m Client -- | Wait for the pipeline's target to resolve, and return the -- corresponding pointer. waitPipeline :: MonadSTM m => Pipeline -> m RawMPtr -- | Spawn a local server with its lifetime bound to the supervisor, and -- return a client for it. When the client is garbage collected, the -- server will be stopped (if it is still running). export :: MonadSTM m => Supervisor -> ServerOps -> m Client clientMethodHandler :: Word64 -> Word16 -> Client -> MethodHandler p r -- | Attempt to unwrap a client, to get at an underlying value from the -- server. Returns Nothing on failure. -- -- This shells out to the underlying server's implementation of -- unwrap. It will fail with Nothing if any of these are -- true: -- -- unwrapServer :: (IsClient c, Typeable a) => c -> Maybe a -- | Wait for the client to be fully resolved, and then return a client -- pointing directly to the destination. -- -- If the argument is null, a local client, or a (permanent) remote -- client, this returns the argument immediately. If the argument is a -- promise client, then this waits for the promise to resolve and returns -- the result of the resolution. If the promise resolves to *another* -- promise, then this waits for that promise to also resolve. -- -- If the promise is rejected, then this throws the corresponding -- exception. waitClient :: (IsClient c, MonadSTM m) => c -> m c -- | Errors which can be thrown by the rpc system. data RpcError -- | The remote vat sent us an abort message. ReceivedAbort :: Parsed Exception -> RpcError -- | We sent an abort to the remote vat. SentAbort :: Parsed Exception -> RpcError instance GHC.Generics.Generic Capnp.Rpc.Untyped.RpcError instance GHC.Classes.Eq Capnp.Rpc.Untyped.RpcError instance GHC.Show.Show Capnp.Rpc.Untyped.RpcError instance Data.Hashable.Class.Hashable Capnp.Rpc.Untyped.EmbargoId instance GHC.Classes.Eq Capnp.Rpc.Untyped.EmbargoId instance Data.Hashable.Class.Hashable Capnp.Rpc.Untyped.QAId instance GHC.Classes.Eq Capnp.Rpc.Untyped.QAId instance Data.Hashable.Class.Hashable Capnp.Rpc.Untyped.IEId instance GHC.Classes.Eq Capnp.Rpc.Untyped.IEId instance GHC.Classes.Eq Capnp.Rpc.Untyped.Pipeline' instance GHC.Classes.Eq Capnp.Rpc.Untyped.Conn instance Data.Hashable.Class.Hashable Capnp.Rpc.Untyped.Conn instance GHC.Classes.Eq Capnp.Rpc.Untyped.ImportRef instance GHC.Classes.Eq Capnp.Rpc.Untyped.Client' instance Capnp.Rpc.Untyped.IsClient Internal.Rpc.Breaker.Client instance Data.Default.Class.Default Capnp.Rpc.Untyped.ConnConfig instance GHC.Show.Show Capnp.Rpc.Untyped.IEId instance GHC.Show.Show Capnp.Rpc.Untyped.QAId instance GHC.Exception.Type.Exception Capnp.Rpc.Untyped.RpcError -- | This module exposes the most commonly used parts of the RPC subsystem. module Capnp.Rpc -- | Handle a connection to another vat. Returns when the connection is -- closed. handleConn :: Transport -> ConnConfig -> IO () -- | Configuration information for a connection. data ConnConfig ConnConfig :: !Word32 -> !Word32 -> !WordCount -> !Bool -> (Supervisor -> STM (Maybe Client)) -> Maybe (Supervisor -> Client -> IO ()) -> ConnConfig -- | The maximum number of simultanious outstanding requests to the peer -- vat. Once this limit is reached, further questsions will block until -- some of the existing questions have been answered. -- -- Defaults to 128. [$sel:maxQuestions:ConnConfig] :: ConnConfig -> !Word32 -- | The maximum number of objects which may be exported on this -- connection. -- -- Defaults to 8192. [$sel:maxExports:ConnConfig] :: ConnConfig -> !Word32 -- | The maximum total size of outstanding call messages that will be -- accepted; if this limit is reached, the implementation will not read -- more messages from the connection until some calls have completed and -- freed up enough space. -- -- Defaults to 32MiB in words. [$sel:maxCallWords:ConnConfig] :: ConnConfig -> !WordCount -- | In debug mode, errors reported by the RPC system to its peers will -- contain extra information. This should not be used in production, as -- it is possible for these messages to contain sensitive information, -- but it can be useful for debugging. -- -- Defaults to False. [$sel:debugMode:ConnConfig] :: ConnConfig -> !Bool -- | Get the bootstrap interface we should serve for this connection. the -- argument is a supervisor whose lifetime is bound to the connection. If -- $sel:getBootstrap:ConnConfig returns Nothing, we will -- respond to bootstrap messages with an exception. -- -- The default always returns Nothing. -- -- $sel:getBootstrap:ConnConfig MUST NOT block; the connection -- will not be serviced and $sel:withBootstrap:ConnConfig will not -- be run until this returns. If you need to supply the bootstrap -- interface later, use newPromiseClient. [$sel:getBootstrap:ConnConfig] :: ConnConfig -> Supervisor -> STM (Maybe Client) -- | An action to perform with access to the remote vat's bootstrap -- interface. The supervisor argument is bound to the lifetime of the -- connection. If this is Nothing (the default), the bootstrap -- interface will not be requested. [$sel:withBootstrap:ConnConfig] :: ConnConfig -> Maybe (Supervisor -> Client -> IO ()) -- | Throw an exception with a type field of Exception'Type'failed -- and the argument as a reason. throwFailed :: MonadThrow m => Text -> m a -- | A Transport handles transmitting RPC messages. data Transport Transport :: (Message 'Const -> IO ()) -> IO (Message 'Const) -> Transport -- | Send a message [$sel:sendMsg:Transport] :: Transport -> Message 'Const -> IO () -- | Receive a message [$sel:recvMsg:Transport] :: Transport -> IO (Message 'Const) -- | socketTransport socket limit is a transport which -- reads and writes messages to/from a socket. It uses limit as -- the traversal limit when reading messages and decoing. socketTransport :: Socket -> WordCount -> Transport -- | handleTransport handle limit is a transport which -- reads and writes messages from/to handle. It uses -- limit as the traversal limit when reading messages and -- decoding. handleTransport :: Handle -> WordCount -> Transport -- | tracingTransport log trans wraps another transport -- trans, loging messages when they are sent or received (using -- the log function). This can be useful for debugging. tracingTransport :: TraceConfig -> Transport -> Transport -- | A reference to a capability, which may be live either in the current -- vat or elsewhere. Holding a client affords making method calls on a -- capability or modifying the local vat's reference count to it. data Client -- | Types which may be converted to and from Clients. Typically -- these will be simple type wrappers for capabilities. class IsClient a -- | Convert a value to a client. toClient :: IsClient a => a -> Client -- | Convert a client to a value. fromClient :: IsClient a => Client -> a -- | Create a new client based on a promise. The fulfiller can be used to -- supply the final client. newPromiseClient :: (MonadSTM m, IsClient c) => m (c, Fulfiller c) -- | Wait for the client to be fully resolved, and then return a client -- pointing directly to the destination. -- -- If the argument is null, a local client, or a (permanent) remote -- client, this returns the argument immediately. If the argument is a -- promise client, then this waits for the promise to resolve and returns -- the result of the resolution. If the promise resolves to *another* -- promise, then this waits for that promise to also resolve. -- -- If the promise is rejected, then this throws the corresponding -- exception. waitClient :: (IsClient c, MonadSTM m) => c -> m c -- | Attempt to unwrap a client, to get at an underlying value from the -- server. Returns Nothing on failure. -- -- This shells out to the underlying server's implementation of -- unwrap. It will fail with Nothing if any of these are -- true: -- -- unwrapServer :: (IsClient c, Typeable a) => c -> Maybe a -- | Membranes are common in object-capability design. Think of it like a -- proxy on steroids: a membrane inserts itself in front of another -- capability, and can intercept and modify method calls. Unlike a simple -- proxy though, the membrane will also be applied to any objects -- returned by method calls, or passed in arguments, transitively, so it -- can sit in front of entire object graphs. module Capnp.Rpc.Membrane -- | enclose sup cap policy wraps cap in a -- membrane whose behavior is goverend by policy. enclose :: (IsClient c, MonadSTM m) => Supervisor -> c -> Policy -> m c -- | exclude is like enclose, except that the capability is -- treated as being *outside* of a membrane that wraps the rest of the -- world. exclude :: (IsClient c, MonadSTM m) => Supervisor -> c -> Policy -> m c -- | A Policy decides what to do when a call crosses the membrane. type Policy = Call -> STM Action -- | An action indicates what to do with an incoming method call. data Action -- | Handle the method using the provided method handler, instead of -- letting it through the membrane. Arguments and return values will not -- be wrapped/unwraped, so be careful when delegating to objects inside -- the membrane. Handle :: UntypedMethodHandler -> Action -- | Forward the method call on to its original destination, wrapping and -- unwrapping arguments & return values as normal. Forward :: Action -- | A Direction indicates which direction a method call is traveling: into -- or out of the membrane. data Direction In :: Direction Out :: Direction -- | A Call represents a method call that is crossing the membrane. data Call Call :: Direction -> Word64 -> Word16 -> Client -> Call -- | Which direction is the call going? if this is In, the call was -- made by something outside the membrane to something inside it. If it -- is Out, something inside the membrane is making a call to -- something outside the membrane. [direction] :: Call -> Direction -- | The interface id of the method being called. [interfaceId] :: Call -> Word64 -- | The ordinal of the method being called. [methodId] :: Call -> Word16 -- | The target of the method call. [target] :: Call -> Client instance GHC.Classes.Eq Capnp.Rpc.Membrane.Direction instance GHC.Read.Read Capnp.Rpc.Membrane.Direction instance GHC.Show.Show Capnp.Rpc.Membrane.Direction instance GHC.Classes.Eq Capnp.Rpc.Membrane.Membrane module Capnp.Rpc.Revoke -- | makeRevocable sup cap returns a pair (wrappedCap, -- revoke), such that wrappedCap is cap wrapped by -- a membrane which forwards all method invocations along until -- revoke is executed, after which all methods that cross the -- membrane (in either direction) will return errors. -- -- Note that, as per usual with membranes, the membrane will wrap any -- objects returned by method calls. So revoke cuts off access to the -- entire object graph reached through cap. makeRevocable :: (MonadSTM m, IsClient c) => Supervisor -> c -> m (c, STM ()) module Capnp.Repr.Methods -- | Represents a method on the interface type c with parameter -- type p and return type r. data Method c p r Method :: !Word64 -> !Word16 -> Method c p r [$sel:interfaceId:Method] :: Method c p r -> !Word64 [$sel:methodId:Method] :: Method c p r -> !Word16 -- | An instance HasMethod name c p r indicates that the -- interface type c has a method named name with -- parameter type p and return type r. The generated -- code includes instances of this for each method in the schema. class (IsCap c, IsStruct p, IsStruct r) => HasMethod (name :: Symbol) c p r | name c -> p r methodByLabel :: HasMethod name c p r => Method c p r -- | A Pipeline a is a reference to possibly-not-resolved -- result from a method call. newtype Pipeline a Pipeline :: Pipeline -> Pipeline a newtype Client a Client :: Client -> Client a -- | Project a pipeline to a struct onto one of its pointer fields. pipe :: (IsStruct a, ReprFor b ~ 'Ptr pr) => Field k a b -> Pipeline a -> Pipeline b -- | Convert a Pipeline for a capability into a Client. pipelineClient :: (IsCap a, MonadSTM m) => Pipeline a -> m (Client a) -- | Wait for the result of a pipeline, and return its value. waitPipeline :: forall a m pr. ('Ptr pr ~ ReprFor a, IsPtrRepr pr, MonadSTM m) => Pipeline a -> m (Raw a 'Const) -- | The AsClient class allows callers of rpc methods to abstract -- over Clients and Pipelines. asClient -- converts either of those to a client so that methods can be invoked on -- it. class AsClient f asClient :: (AsClient f, MonadSTM m) => IsCap c => f c -> m (Client c) -- | Upcast is a (safe) cast from an interface to one of its superclasses. upcast :: (AsClient f, Coercible (f p) (f c), Super p c) => f c -> f p -- | Call a method. Use the provided PureBuilder to construct the -- parameters. callB :: (AsClient f, IsCap c, IsStruct p, MonadIO m) => Method c p r -> (forall s. PureBuilder s (Raw p ('Mut s))) -> f c -> m (Pipeline r) -- | Call a method, supplying the parameters as a Raw struct. callR :: (AsClient f, IsCap c, IsStruct p, MonadIO m) => Method c p r -> Raw p 'Const -> f c -> m (Pipeline r) -- | Call a method, supplying the parmaeters in parsed form. callP :: forall c p r f m pp. (AsClient f, IsCap c, IsStruct p, Parse p pp, MonadIO m) => Method c p r -> pp -> f c -> m (Pipeline r) instance Capnp.Repr.Methods.AsClient Capnp.Rpc.Common.Pipeline instance Capnp.Repr.Methods.AsClient Capnp.Rpc.Common.Client instance Capnp.Repr.Methods.HasMethod name c p r => GHC.OverloadedLabels.IsLabel name (Capnp.Repr.Methods.Method c p r) instance (Capnp.Repr.ReprFor a GHC.Types.~ 'Capnp.Untyped.Ptr ('GHC.Maybe.Just 'Capnp.Untyped.Cap)) => Capnp.Rpc.Untyped.IsClient (Capnp.Rpc.Common.Client a) module Capnp.New.Rpc.Server -- | A handler for arbitrary RPC calls. Maps (interfaceId, methodId) pairs -- to UntypedMethodHandlers. type CallHandler = Map Word64 (Vector UntypedMethodHandler) -- | Type alias for a handler for a particular rpc method. type MethodHandler p r = Raw p 'Const -> Fulfiller (Raw r 'Const) -> IO () -- | Type alias for a handler for an untyped RPC method. type UntypedMethodHandler = MethodHandler AnyStruct AnyStruct -- | Generated interface types have instances of Export, which -- allows a server for that interface to be exported as a Client. class (IsCap i, HasTypeId i) => Export i where { -- | The constraint needed for a server to implement an interface; if -- Server i s is satisfied, s is a server for -- interface i. The code generator generates a type class for -- each interface, and this will aways be an alias for that type class. type Server i :: Type -> Constraint; } -- | Convert the server to a MethodHandlerTree populated with -- appropriate MethodHandlers for the interface. This is really -- only exported for use by generated code; users of the library will -- generally prefer to use export. methodHandlerTree :: (Export i, Server i s) => Proxy i -> s -> MethodHandlerTree -- | Export the server as a client for interface i. Spawns a -- server thread with its lifetime bound to the supervisor. export :: forall i s m. (MonadSTM m, Export i, Server i s, SomeServer s) => Supervisor -> s -> m (Client i) -- | Look up a particlar MethodHandler in the CallHandler. findMethod :: Word64 -> Word16 -> CallHandler -> Maybe UntypedMethodHandler -- | Base class for things that can act as capnproto servers. class SomeServer a -- | Called when the last live reference to a server is dropped. shutdown :: SomeServer a => a -> IO () -- | Try to extract a value of a given type. The default implementation -- always fails (returns Nothing). If an instance chooses to -- implement this, it will be possible to use "reflection" on clients -- that point at local servers to dynamically unwrap the server value. A -- typical implementation will just call Typeable's cast method, -- but this needn't be the case -- a server may wish to allow local peers -- to unwrap some value that is not exactly the data the server has -- access to. unwrap :: (SomeServer a, Typeable b) => a -> Maybe b -- | Handle a method, working with the parsed form of parameters and -- results. handleParsed :: (Parse p pp, IsStruct p, Parse r pr, IsStruct r) => (pp -> IO pr) -> MethodHandler p r -- | Handle a method, working with the raw (unparsed) form of parameters -- and results. handleRaw :: (IsStruct p, IsStruct r) => (Raw p 'Const -> IO (Raw r 'Const)) -> MethodHandler p r -- | MethodHandler that always throws unimplemented. methodUnimplemented :: MethodHandler p r -- | Convert a typed method handler to an untyped one. Mostly intended for -- use by generated code. toUntypedMethodHandler :: forall p r. (IsStruct p, IsStruct r) => MethodHandler p r -> UntypedMethodHandler -- | Lazily computed tree of the method handlers exposed by an interface. -- Only of interest to generated code. data MethodHandlerTree MethodHandlerTree :: Word64 -> [UntypedMethodHandler] -> [MethodHandlerTree] -> MethodHandlerTree -- | type id for the primary interface [$sel:mhtId:MethodHandlerTree] :: MethodHandlerTree -> Word64 -- | method handlers for methods of the primary interface. [$sel:mhtHandlers:MethodHandlerTree] :: MethodHandlerTree -> [UntypedMethodHandler] -- | Trees for parent interfaces. In the case of diamond dependencies, -- there may be duplicates, which are eliminated by -- mhtToCallHandler. [$sel:mhtParents:MethodHandlerTree] :: MethodHandlerTree -> [MethodHandlerTree] module Capnp.GenHelpers.Rpc parseCap :: (IsCap a, ReadCtx m 'Const) => Raw a 'Const -> m (Client a) encodeCap :: (IsCap a, RWCtx m s) => Message ('Mut s) -> Client a -> m (Raw a ('Mut s)) module Capnp.Gen.Capnp.Persistent data Persistent sturdyRef owner class Persistent'server_ sturdyRef owner s_ persistent'save :: Persistent'server_ sturdyRef owner s_ => s_ -> MethodHandler (Persistent'SaveParams sturdyRef owner) (Persistent'SaveResults sturdyRef owner) data Persistent'SaveParams sturdyRef owner data Persistent'SaveResults sturdyRef owner data RealmGateway internalRef externalRef internalOwner externalOwner class RealmGateway'server_ internalRef externalRef internalOwner externalOwner s_ realmGateway'import_ :: RealmGateway'server_ internalRef externalRef internalOwner externalOwner s_ => s_ -> MethodHandler (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveResults internalRef internalOwner) realmGateway'export :: RealmGateway'server_ internalRef externalRef internalOwner externalOwner s_ => s_ -> MethodHandler (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveResults externalRef externalOwner) data RealmGateway'import'params internalRef externalRef internalOwner externalOwner data RealmGateway'export'params internalRef externalRef internalOwner externalOwner instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance GHC.Generics.Generic (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (GHC.Show.Show (Capnp.Repr.Parsed.Parsed sturdyRef), GHC.Show.Show (Capnp.Repr.Parsed.Parsed owner)) => GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance (GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed sturdyRef), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed owner)) => GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance (GHC.Show.Show (Capnp.Repr.Parsed.Parsed sturdyRef), GHC.Show.Show (Capnp.Repr.Parsed.Parsed owner)) => GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance (GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed sturdyRef), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed owner)) => GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance (GHC.Show.Show (Capnp.Repr.Parsed.Parsed internalRef), GHC.Show.Show (Capnp.Repr.Parsed.Parsed externalRef), GHC.Show.Show (Capnp.Repr.Parsed.Parsed internalOwner), GHC.Show.Show (Capnp.Repr.Parsed.Parsed externalOwner)) => GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance (GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed internalRef), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed externalRef), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed internalOwner), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed externalOwner)) => GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance (GHC.Show.Show (Capnp.Repr.Parsed.Parsed internalRef), GHC.Show.Show (Capnp.Repr.Parsed.Parsed externalRef), GHC.Show.Show (Capnp.Repr.Parsed.Parsed internalOwner), GHC.Show.Show (Capnp.Repr.Parsed.Parsed externalOwner)) => GHC.Show.Show (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed internalRef), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed externalRef), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed internalOwner), GHC.Classes.Eq (Capnp.Repr.Parsed.Parsed externalOwner)) => GHC.Classes.Eq (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.New.Rpc.Server.Export (Capnp.Gen.Capnp.Persistent.RealmGateway internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Repr.Methods.HasMethod "export" (Capnp.Gen.Capnp.Persistent.RealmGateway internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults externalRef externalOwner) instance Capnp.Classes.HasTypeId (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.TypedStruct (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Allocate (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.EstimateAlloc (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.AllocateList (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.EstimateListAlloc (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Parse (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Marshal (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Fields.HasField "cap" 'Capnp.Fields.Slot (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.Persistent internalRef internalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Fields.HasField "params" 'Capnp.Fields.Slot (Capnp.Gen.Capnp.Persistent.RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams externalRef externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Repr.Methods.HasMethod "import_" (Capnp.Gen.Capnp.Persistent.RealmGateway internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults internalRef internalOwner) instance Capnp.Classes.HasTypeId (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.TypedStruct (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Allocate (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.EstimateAlloc (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.AllocateList (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.EstimateListAlloc (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Parse (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Marshal (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Fields.HasField "cap" 'Capnp.Fields.Slot (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.Persistent externalRef externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Fields.HasField "params" 'Capnp.Fields.Slot (Capnp.Gen.Capnp.Persistent.RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams internalRef internalOwner) instance Capnp.Classes.HasTypeId (Capnp.Gen.Capnp.Persistent.RealmGateway internalRef externalRef internalOwner externalOwner) instance (Capnp.Constraints.TypeParam internalRef, Capnp.Constraints.TypeParam externalRef, Capnp.Constraints.TypeParam internalOwner, Capnp.Constraints.TypeParam externalOwner) => Capnp.Classes.Parse (Capnp.Gen.Capnp.Persistent.RealmGateway internalRef externalRef internalOwner externalOwner) (Capnp.Rpc.Common.Client (Capnp.Gen.Capnp.Persistent.RealmGateway internalRef externalRef internalOwner externalOwner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.New.Rpc.Server.Export (Capnp.Gen.Capnp.Persistent.Persistent sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Repr.Methods.HasMethod "save" (Capnp.Gen.Capnp.Persistent.Persistent sturdyRef owner) (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) instance Capnp.Classes.HasTypeId (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.TypedStruct (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Allocate (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.EstimateAlloc (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.AllocateList (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.EstimateListAlloc (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Parse (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Marshal (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Fields.HasField "sturdyRef" 'Capnp.Fields.Slot (Capnp.Gen.Capnp.Persistent.Persistent'SaveResults sturdyRef owner) sturdyRef instance Capnp.Classes.HasTypeId (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.TypedStruct (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Allocate (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.EstimateAlloc (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.AllocateList (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.EstimateListAlloc (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Parse (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Marshal (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) (Capnp.Classes.Parsed (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner)) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Fields.HasField "sealFor" 'Capnp.Fields.Slot (Capnp.Gen.Capnp.Persistent.Persistent'SaveParams sturdyRef owner) owner instance Capnp.Classes.HasTypeId (Capnp.Gen.Capnp.Persistent.Persistent sturdyRef owner) instance (Capnp.Constraints.TypeParam sturdyRef, Capnp.Constraints.TypeParam owner) => Capnp.Classes.Parse (Capnp.Gen.Capnp.Persistent.Persistent sturdyRef owner) (Capnp.Rpc.Common.Client (Capnp.Gen.Capnp.Persistent.Persistent sturdyRef owner)) module Capnp.Gen.ById.Xb8630836983feed7 module Capnp -- | Monad transformer implementing MonadLimit. The underlying monad -- must implement MonadThrow. invoice calls -- throwM TraversalLimitError when the limit is -- exhausted. data LimitT m a -- | mtl-style type class to track the traversal limit. This is used by -- other parts of the library which actually do the reading. class Monad m => MonadLimit m -- | invoice n deducts n from the traversal limit, -- signaling an error if the limit is exhausted. invoice :: MonadLimit m => WordCount -> m () -- | Run a LimitT, returning the value from the computation and the -- remaining traversal limit. runLimitT :: MonadThrow m => WordCount -> LimitT m a -> m (a, WordCount) -- | Run a LimitT, returning the value from the computation. evalLimitT :: MonadThrow m => WordCount -> LimitT m a -> m a -- | Run a LimitT, returning the remaining traversal limit. execLimitT :: MonadThrow m => WordCount -> LimitT m a -> m WordCount -- | A sensible default traversal limit. Currently 64 MiB. defaultLimit :: WordCount newtype Client a Client :: Client -> Client a -- | A Pipeline a is a reference to possibly-not-resolved -- result from a method call. newtype Pipeline a Pipeline :: Pipeline -> Pipeline a -- | hPutMsg handle msg writes msg to -- handle. If there is an exception, it will be an -- IOError raised by the underlying IO libraries. hPutMsg :: Handle -> Message 'Const -> IO () -- | Equivalent to hPutMsg stdout putMsg :: Message 'Const -> IO () -- | hGetMsg handle limit reads a message from -- handle that is at most limit 64-bit words in length. hGetMsg :: Handle -> WordCount -> IO (Message 'Const) -- | Equivalent to hGetMsg stdin getMsg :: WordCount -> IO (Message 'Const) structPtrs :: Parsed AnyStruct -> Vector (Maybe (Parsed AnyPointer)) structData :: Parsed AnyStruct -> Vector Word64 ListStruct :: ParsedList (Parsed AnyStruct) %1 -> Parsed AnyList List64 :: ParsedList Word64 %1 -> Parsed AnyList List32 :: ParsedList Word32 %1 -> Parsed AnyList List16 :: ParsedList Word16 %1 -> Parsed AnyList List8 :: ParsedList Word8 %1 -> Parsed AnyList List1 :: ParsedList Bool %1 -> Parsed AnyList List0 :: ParsedList () %1 -> Parsed AnyList PtrStruct :: Parsed AnyStruct %1 -> Parsed AnyPointer PtrList :: Parsed AnyList %1 -> Parsed AnyPointer PtrCap :: Client %1 -> Parsed AnyPointer Struct :: Vector Word64 %1 -> Vector (Maybe (Parsed AnyPointer)) %1 -> Parsed AnyStruct ListPtr :: ParsedList (Maybe (Parsed AnyPointer)) %1 -> Parsed AnyList class (Parse a ap, Allocate (List a)) => EstimateListAlloc a ap estimateListAlloc :: EstimateListAlloc a ap => Vector ap -> AllocHint (List a) estimateListAlloc :: (EstimateListAlloc a ap, AllocHint (List a) ~ Int) => Vector ap -> AllocHint (List a) -- | An instance Super p c indicates that the interface -- c extends the interface p. class (IsCap p, IsCap c) => Super p c -- | Type alias capturing the constraints on a type needed by -- marshalElement type MarshalElement a ap = (Parse a ap, EstimateListAlloc a ap, Element (ReprFor a), ListItem (ElemRepr (ListReprFor (ReprFor a))), HasMessage (ListOf (ElemRepr (ListReprFor (ReprFor a)))), MarshalElementByRepr (ListReprFor (ReprFor a)), MarshalElementReprConstraints (ListReprFor (ReprFor a)) a ap) -- | Operations on typed structs. class (IsStruct a, Allocate a, HasTypeId a, AllocHint a ~ ()) => TypedStruct a numStructWords :: TypedStruct a => Word16 numStructPtrs :: TypedStruct a => Word16 -- | Types which have a numeric type-id defined in a capnp schema. class HasTypeId a -- | The node id for this type. You will generally want to use the -- TypeApplications extension to specify the type. typeId :: HasTypeId a => Word64 -- | An instance of marshal allows a parsed value to be inserted into -- pre-allocated space in a message. class Parse t p => Marshal t p -- | Marshal a value into the pre-allocated object inside the message. -- -- Note that caller must arrange for the object to be of the correct -- size. This is is not necessarily guaranteed; for example, list types -- must coordinate the length of the list. marshalInto :: (Marshal t p, RWCtx m s) => Raw t ('Mut s) -> p -> m () -- | Like Allocate, but for allocating *lists* of a. class AllocateList a where { -- | Extra information needed to allocate a list of as. type ListAllocHint a; } newList :: (AllocateList a, RWCtx m s) => ListAllocHint a -> Message ('Mut s) -> m (Raw (List a) ('Mut s)) newList :: forall m s lr r. (AllocateList a, RWCtx m s, lr ~ ListReprFor (ReprFor a), r ~ 'List ('Just lr), Allocate r, AllocHint r ~ ListAllocHint a) => ListAllocHint a -> Message ('Mut s) -> m (Raw (List a) ('Mut s)) -- | Types which may be allocated directly inside a message. class Allocate a where { -- | Extra information needed to allocate a value of this type, e.g. the -- length for a list. May be () if no extra info is needed. type AllocHint a; } -- | new hint msg allocates a new value of type a -- inside msg. new :: (Allocate a, RWCtx m s) => AllocHint a -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | new hint msg allocates a new value of type a -- inside msg. new :: (Allocate a, ReprFor a ~ 'Ptr ('Just pr), Allocate pr, AllocHint a ~ AllocHint pr, RWCtx m s) => AllocHint a -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | Types where the necessary allocation is inferrable from the parsed -- form. -- -- ...this is most types. class (Parse t p, Allocate t) => EstimateAlloc t p -- | Determine the appropriate hint needed to allocate space for the -- serialied form of the value. estimateAlloc :: EstimateAlloc t p => p -> AllocHint t -- | Determine the appropriate hint needed to allocate space for the -- serialied form of the value. estimateAlloc :: (EstimateAlloc t p, AllocHint t ~ ()) => p -> AllocHint t -- | Capnp types that can be parsed into a more "natural" Haskell form. -- -- class Parse t p | t -> p, p -> t -- | Parse a value from a constant message parse :: (Parse t p, ReadCtx m 'Const) => Raw t 'Const -> m p -- | Encode a value into Raw form, using the message as storage. encode :: (Parse t p, RWCtx m s) => Message ('Mut s) -> p -> m (Raw t ('Mut s)) -- | Encode a value into Raw form, using the message as storage. encode :: (Parse t p, RWCtx m s, EstimateAlloc t p, Marshal t p) => Message ('Mut s) -> p -> m (Raw t ('Mut s)) -- | Implementation of new valid for types whose AllocHint is -- the same as that of their underlying representation. newFromRepr :: forall a r m s. (Allocate r, 'Ptr ('Just r) ~ ReprFor a, RWCtx m s) => AllocHint r -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | Allocate a new typed struct. Mainly used as the value for new -- for in generated instances of Allocate. newTypedStruct :: forall a m s. (TypedStruct a, RWCtx m s) => Message ('Mut s) -> m (Raw a ('Mut s)) -- | Like newTypedStruct, but for lists. newTypedStructList :: forall a m s. (TypedStruct a, RWCtx m s) => Int -> Message ('Mut s) -> m (Raw (List a) ('Mut s)) -- | Get the maximum word and pointer counts needed for a struct type's -- fields. structSizes :: forall a. TypedStruct a => (Word16, Word16) -- | Like new, but also sets the value as the root of the message. newRoot :: forall a m s. (RWCtx m s, IsStruct a, Allocate a) => AllocHint a -> Message ('Mut s) -> m (Raw a ('Mut s)) -- | Sets the struct to be the root of its containing message. setRoot :: (RWCtx m s, IsStruct a) => Raw a ('Mut s) -> m () -- | Types that can be converted to and from a 64-bit word. -- -- Anything that goes in the data section of a struct will have an -- instance of this. class IsWord a -- | Convert from a 64-bit words Truncates the word if the type has less -- than 64 bits. fromWord :: IsWord a => Word64 -> a -- | Convert to a 64-bit word. toWord :: IsWord a => a -> Word64 -- | Convert an immutable message to a bytestring Builder. To -- convert a mutable message, freeze it first. msgToBuilder :: Message 'Const -> Builder -- | Convert an immutable message to a lazy ByteString. To convert a -- mutable message, freeze it first. msgToLBS :: Message 'Const -> ByteString -- | Convert an immutable message to a strict ByteString. To convert -- a mutable message, freeze it first. msgToBS :: Message 'Const -> ByteString -- | Convert a strict ByteString to a message. bsToMsg :: MonadThrow m => ByteString -> m (Message 'Const) -- | Convert a lazy ByteString to a message. lbsToMsg :: MonadThrow m => ByteString -> m (Message 'Const) -- | Get the root pointer of a message, wrapped as a Raw. msgToRaw :: forall a m mut. (ReadCtx m mut, IsStruct a) => Message mut -> m (Raw a mut) -- | Get the root pointer of a message, as a parsed ADT. msgToParsed :: forall a m pa. (ReadCtx m 'Const, IsStruct a, Parse a pa) => Message 'Const -> m pa -- | Like msgToRaw, but takes a (strict) bytestring. bsToRaw :: forall a m. (ReadCtx m 'Const, IsStruct a) => ByteString -> m (Raw a 'Const) -- | Like msgToParsed, but takes a (strict) bytestring. bsToParsed :: forall a pa m. (ReadCtx m 'Const, IsStruct a, Parse a pa) => ByteString -> m pa -- | Like msgToRaw, but takes a (lazy) bytestring. lbsToRaw :: forall a m. (ReadCtx m 'Const, IsStruct a) => ByteString -> m (Raw a 'Const) -- | Like msgToParsed, but takes a (lazzy) bytestring. lbsToParsed :: forall a pa m. (ReadCtx m 'Const, IsStruct a, Parse a pa) => ByteString -> m pa -- | Serialize the parsed form of a struct into its Raw form, and -- make it the root of its message. parsedToRaw :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m (Raw a ('Mut s)) -- | Serialize the parsed form of a struct into a message with that value -- as its root, returning the message. parsedToMsg :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m (Message ('Mut s)) -- | Serialize the parsed form of a struct and return it as a -- Builder parsedToBuilder :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m Builder -- | Serialize the parsed form of a struct and return it as a lazy -- ByteString parsedToLBS :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m ByteString -- | Serialize the parsed form of a struct and return it as a strict -- ByteString parsedToBS :: forall a m pa s. (RWCtx m s, IsStruct a, Parse a pa) => pa -> m ByteString -- | Like hGetMsg, except that it takes a socket instead of a -- Handle. sGetMsg :: Socket -> WordCount -> IO (Message 'Const) -- | Like hPutMsg, except that it takes a Socket instead of -- a Handle. sPutMsg :: Socket -> Message 'Const -> IO () -- | Read a struct from the handle in its parsed form, using the supplied -- read limit. hGetParsed :: forall a pa. (IsStruct a, Parse a pa) => Handle -> WordCount -> IO pa -- | Read a struct from the socket in its parsed form, using the supplied -- read limit. sGetParsed :: forall a pa. (IsStruct a, Parse a pa) => Socket -> WordCount -> IO pa -- | Read a struct from stdin in its parsed form, using the supplied read -- limit. getParsed :: (IsStruct a, Parse a pa) => WordCount -> IO pa -- | Write the parsed form of a struct to the handle hPutParsed :: (IsStruct a, Parse a pa) => Handle -> pa -> IO () -- | Write the parsed form of a struct to stdout putParsed :: (IsStruct a, Parse a pa) => pa -> IO () -- | Write the parsed form of a struct to the socket. sPutParsed :: (IsStruct a, Parse a pa) => Socket -> pa -> IO () -- | Read a struct from the handle using the supplied read limit, and -- return its root pointer. hGetRaw :: IsStruct a => Handle -> WordCount -> IO (Raw a 'Const) -- | Read a struct from stdin using the supplied read limit, and return its -- root pointer. getRaw :: IsStruct a => WordCount -> IO (Raw a 'Const) -- | Read a struct from the socket using the supplied read limit, and -- return its root pointer. sGetRaw :: IsStruct a => Socket -> WordCount -> IO (Raw a 'Const) type ParsedList a = Vector a -- | A Cap'n Proto capability with unknown interfaces. data Capability -- | A Cap'n Proto struct of unknown type. data AnyStruct -- | A Cap'n Proto List with unknown element type. data AnyList -- | A Cap'n Proto AnyPointer, i.e. an arbitrary pointer with -- unknown schema. data AnyPointer -- | The Cap'n Proto Data type. data Data -- | The Cap'n Proto Text type. data Text -- | Return the underlying buffer containing the text. This does not -- include the null terminator. textBuffer :: MonadThrow m => Raw Text mut -> m (Raw Data mut) -- | Convert a Text to a ByteString, comprising the raw bytes -- of the text (not counting the NUL terminator). textBytes :: ReadCtx m 'Const => Raw Text 'Const -> m ByteString -- | Constraints needed for a to be a capnproto type parameter. type TypeParam a = (IsPtr a, Parse a (Parsed a)) -- | Read the value of a field of a struct. readField :: forall k a b mut m. (IsStruct a, ReadCtx m mut) => Field k a b -> Raw a mut -> m (Raw b mut) -- | Return whether the specified field is present. Only applicable for -- pointer fields. hasField :: (ReadCtx m mut, IsStruct a, IsPtr b) => Field 'Slot a b -> Raw a mut -> m Bool -- | Like readField, but: -- -- getField :: (IsStruct a, ReprFor b ~ 'Data sz, Parse b bp) => Field 'Slot a b -> Raw a 'Const -> bp -- | Set a struct field to a value. Not usable for group fields. setField :: forall a b m s. (IsStruct a, RWCtx m s) => Field 'Slot a b -> Raw b ('Mut s) -> Raw a ('Mut s) -> m () -- | Allocate space for the value of a field, and return it. newField :: forall a b m s. (IsStruct a, Allocate b, RWCtx m s) => Field 'Slot a b -> AllocHint b -> Raw a ('Mut s) -> m (Raw b ('Mut s)) -- | Marshal a parsed value into a struct's field. encodeField :: forall a b m s bp. (IsStruct a, Parse b bp, RWCtx m s) => Field 'Slot a b -> bp -> Raw a ('Mut s) -> m () -- | parse a struct's field and return its parsed form. parseField :: (IsStruct a, Parse b bp, ReadCtx m 'Const) => Field k a b -> Raw a 'Const -> m bp -- | Set the struct's anonymous union to the given variant, with the -- supplied value as its argument. Not applicable for variants whose -- argument is a group; use initVariant instead. setVariant :: forall a b m s. (HasUnion a, RWCtx m s) => Variant 'Slot a b -> Raw a ('Mut s) -> Raw b ('Mut s) -> m () -- | Set the struct's anonymous union to the given variant, marshalling the -- supplied value into the message to be its argument. Not applicable for -- variants whose argument is a group; use initVariant instead. encodeVariant :: forall a b m s bp. (HasUnion a, Parse b bp, RWCtx m s) => Variant 'Slot a b -> bp -> Raw a ('Mut s) -> m () -- | Set the struct's anonymous union to the given variant, returning the -- variant's argument, which must be a group (for non-group fields, use -- setVariant or encodeVariant. initVariant :: forall a b m s. (HasUnion a, RWCtx m s) => Variant 'Group a b -> Raw a ('Mut s) -> m (Raw b ('Mut s)) -- | Get the anonymous union for a struct. structUnion :: HasUnion a => Raw a mut -> Raw (Which a) mut -- | Get the struct enclosing an anonymous union. unionStruct :: HasUnion a => Raw (Which a) mut -> Raw a mut -- | Get a non-opaque view on the struct's anonymous union, which can be -- used to pattern match on. structWhich :: forall a mut m. (ReadCtx m mut, HasUnion a) => Raw a mut -> m (RawWhich a mut) -- | Get a non-opaque view on the anonymous union, which can be used to -- pattern match on. unionWhich :: forall a mut m. (ReadCtx m mut, HasUnion a) => Raw (Which a) mut -> m (RawWhich a mut) -- | The AsClient class allows callers of rpc methods to abstract -- over Clients and Pipelines. asClient -- converts either of those to a client so that methods can be invoked on -- it. class AsClient f asClient :: (AsClient f, MonadSTM m) => IsCap c => f c -> m (Client c) -- | An instance HasMethod name c p r indicates that the -- interface type c has a method named name with -- parameter type p and return type r. The generated -- code includes instances of this for each method in the schema. class (IsCap c, IsStruct p, IsStruct r) => HasMethod (name :: Symbol) c p r | name c -> p r methodByLabel :: HasMethod name c p r => Method c p r -- | Represents a method on the interface type c with parameter -- type p and return type r. data Method c p r Method :: !Word64 -> !Word16 -> Method c p r [$sel:interfaceId:Method] :: Method c p r -> !Word64 [$sel:methodId:Method] :: Method c p r -> !Word16 -- | Upcast is a (safe) cast from an interface to one of its superclasses. upcast :: (AsClient f, Coercible (f p) (f c), Super p c) => f c -> f p -- | Call a method. Use the provided PureBuilder to construct the -- parameters. callB :: (AsClient f, IsCap c, IsStruct p, MonadIO m) => Method c p r -> (forall s. PureBuilder s (Raw p ('Mut s))) -> f c -> m (Pipeline r) -- | Call a method, supplying the parameters as a Raw struct. callR :: (AsClient f, IsCap c, IsStruct p, MonadIO m) => Method c p r -> Raw p 'Const -> f c -> m (Pipeline r) -- | Call a method, supplying the parmaeters in parsed form. callP :: forall c p r f m pp. (AsClient f, IsCap c, IsStruct p, Parse p pp, MonadIO m) => Method c p r -> pp -> f c -> m (Pipeline r) -- | Project a pipeline to a struct onto one of its pointer fields. pipe :: (IsStruct a, ReprFor b ~ 'Ptr pr) => Field k a b -> Pipeline a -> Pipeline b -- | Convert a Pipeline for a capability into a Client. pipelineClient :: (IsCap a, MonadSTM m) => Pipeline a -> m (Client a) -- | Wait for the result of a pipeline, and return its value. waitPipeline :: forall a m pr. ('Ptr pr ~ ReprFor a, IsPtrRepr pr, MonadSTM m) => Pipeline a -> m (Raw a 'Const) -- | Parsed a is the high-level/ADT representation of the -- capnproto type a. For struct types this is equivalent to -- Parsed a, but we special case other types, such that -- e.g. Parsed Data = ByteString. type Parsed a = ParsedByRepr (ReprFor a) a -- | A Raw mut a is an a embedded in a capnproto -- message with mutability mut. newtype Raw (a :: Type) (mut :: Mutability) Raw :: Unwrapped (Untyped (ReprFor a) mut) -> Raw (a :: Type) (mut :: Mutability) [fromRaw] :: Raw (a :: Type) (mut :: Mutability) -> Unwrapped (Untyped (ReprFor a) mut) -- | A phantom type denoting capnproto lists of type a. data List a -- | index i list gets the ith element of the -- list. index :: forall a m mut. (ReadCtx m mut, HasMessage (ListOf (ElemRepr (ListReprFor (ReprFor a)))), ListElem a) => Int -> Raw (List a) mut -> m (Raw a mut) -- | setIndex value i list sets the ith element of -- list to value. setIndex :: forall a m s. (RWCtx m s, ListItem (ElemRepr (ListReprFor (ReprFor a))), Element (ReprFor a)) => Raw a ('Mut s) -> Int -> Raw (List a) ('Mut s) -> m () -- | Get the length of a capnproto list. length :: ListElem a => Raw (List a) mut -> Int -- | Field k a b is a first-class representation of a field -- of type b within an a, where a must be a -- struct type. data Field (k :: FieldKind) a b -- | What sort of field is this? This corresponds to the slot/group -- variants in the Field type in schema.capnp. Mostly used at -- the type level with the DataKinds extension. -- -- (Note that this has nothing to do with kinds in the usual type system -- sense of the word). data FieldKind -- | An instance HasField name k a b indicates that the -- struct type a has a field named name with type -- b (with k being the FieldKind for the field). -- The generated code includes instances of this for each field in the -- schema. class IsStruct a => HasField (name :: Symbol) k a b | a name -> k b fieldByLabel :: HasField name k a b => Field k a b -- | An instance of HasUnion indicates that the given type is a -- capnproto struct (or group) with an anonymous union. class IsStruct a => HasUnion a where { -- | Which is the abstract capnproto type of the union itself. Like -- generated struct types (in this case a), this is typically -- uninhabitied, and used to define instances and/or act as a phantom -- type. data Which a; -- | Concrete view into a union embedded in a message. This will be a sum -- type with other Raw values as arguments. data RawWhich a (mut :: Mutability); } -- | unionField is a field holding the union's tag. unionField :: HasUnion a => Field 'Slot a Word16 -- | Helper used in generated code to extract a RawWhich from its -- surrounding struct. internalWhich :: (HasUnion a, ReadCtx m mut) => Word16 -> Raw a mut -> m (RawWhich a mut) -- | An instance 'HasVariant name k a b indicates that the struct -- type a has an anonymous union with a variant named -- name, whose argument is of type b. class HasUnion a => HasVariant (name :: Symbol) k a b | a name -> k b variantByLabel :: HasVariant name k a b => Variant k a b -- | A Cap'n Proto message, parametrized over its mutability. data family Message (mut :: Mutability) -- | A segment in a Cap'n Proto message. data family Segment (mut :: Mutability) -- | Mutability is used as a type parameter (with the DataKinds -- extension) to indicate the mutability of some values in this library; -- Const denotes an immutable value, while Mut s -- denotes a value that can be mutated in the scope of the state token -- s. data Mutability Const :: Mutability Mut :: Type -> Mutability -- | A Message is a (possibly read-only) capnproto message. It is -- parameterized over a monad in which operations are performed. class Monad m => MonadReadMessage mut m -- | numSegs gets the number of segments in a message. numSegs :: MonadReadMessage mut m => Message mut -> m Int -- | numWords gets the number of words in a segment. numWords :: MonadReadMessage mut m => Segment mut -> m WordCount -- | numCaps gets the number of capabilities in a message's -- capability table. numCaps :: MonadReadMessage mut m => Message mut -> m Int -- | getSegment message index gets the segment at index -- index in message. getSegment :: MonadReadMessage mut m => Message mut -> Int -> m (Segment mut) -- | internalGetCap cap index reads a capability from the -- message's capability table, returning the client. does not check -- bounds. Callers should use getCap instead. internalGetCap :: MonadReadMessage mut m => Message mut -> Int -> m Client -- | slice start length segment extracts a sub-section of -- the segment, starting at index start, of length -- length. slice :: MonadReadMessage mut m => WordCount -> WordCount -> Segment mut -> m (Segment mut) -- | read segment index reads a 64-bit word from the -- segement at the given index. Consider using getWord on the -- message, instead of calling this directly. read :: MonadReadMessage mut m => Segment mut -> WordCount -> m Word64 -- | newMessage sizeHint allocates a new empty message, -- with a single segment having capacity sizeHint. If -- sizeHint is Nothing, defaults to a sensible value. newMessage :: WriteCtx m s => Maybe WordCount -> m (Message ('Mut s)) -- | Convert a ByteString to a segment. O(1) fromByteString :: ByteString -> Segment 'Const -- | Convert a segment to a byte string. O(1) toByteString :: Segment 'Const -> ByteString -- | PureBuilder is a monad transformer stack with the instnaces -- needed manipulate mutable messages. PureBuilder s a is -- morally equivalent to LimitT (CatchT (ST -- s)) a data PureBuilder s a -- | createPure limit m creates a capnproto value in pure -- code according to m, then freezes it without copying. If -- m calls throwM then createPure rethrows the -- exception in the specified monad. createPure :: (MonadThrow m, MaybeMutable f) => WordCount -> (forall s. PureBuilder s (f ('Mut s))) -> m (f 'Const) -- | Return a canonicalized message with a copy of the given struct as its -- root. returns a (message, segment) pair, where the segment is the -- first and only segment of the returned message. -- -- In addition to the usual reasons for failure when reading a message -- (traversal limit, malformed messages), this can fail if the message -- does not fit in a single segment, as the canonical form requires -- single-segment messages. canonicalize :: RWCtx m s => Struct 'Const -> m (Message ('Mut s), Segment ('Mut s)) -- | Type alias for a handler for a particular rpc method. type MethodHandler p r = Raw p 'Const -> Fulfiller (Raw r 'Const) -> IO () -- | Base class for things that can act as capnproto servers. class SomeServer a -- | Called when the last live reference to a server is dropped. shutdown :: SomeServer a => a -> IO () -- | Try to extract a value of a given type. The default implementation -- always fails (returns Nothing). If an instance chooses to -- implement this, it will be possible to use "reflection" on clients -- that point at local servers to dynamically unwrap the server value. A -- typical implementation will just call Typeable's cast method, -- but this needn't be the case -- a server may wish to allow local peers -- to unwrap some value that is not exactly the data the server has -- access to. unwrap :: (SomeServer a, Typeable b) => a -> Maybe b -- | Generated interface types have instances of Export, which -- allows a server for that interface to be exported as a Client. class (IsCap i, HasTypeId i) => Export i where { -- | The constraint needed for a server to implement an interface; if -- Server i s is satisfied, s is a server for -- interface i. The code generator generates a type class for -- each interface, and this will aways be an alias for that type class. type Server i :: Type -> Constraint; } -- | Export the server as a client for interface i. Spawns a -- server thread with its lifetime bound to the supervisor. export :: forall i s m. (MonadSTM m, Export i, Server i s, SomeServer s) => Supervisor -> s -> m (Client i) -- | Handle a method, working with the parsed form of parameters and -- results. handleParsed :: (Parse p pp, IsStruct p, Parse r pr, IsStruct r) => (pp -> IO pr) -> MethodHandler p r -- | Handle a method, working with the raw (unparsed) form of parameters -- and results. handleRaw :: (IsStruct p, IsStruct r) => (Raw p 'Const -> IO (Raw r 'Const)) -> MethodHandler p r -- | MethodHandler that always throws unimplemented. methodUnimplemented :: MethodHandler p r -- | Constraint that a is a struct type. type IsStruct a = ReprFor a ~ 'Ptr ('Just 'Struct) -- | Constraint that a is a capability type. type IsCap a = ReprFor a ~ 'Ptr ('Just 'Cap) -- | Constraint that a is a pointer type. type IsPtr a = (ReprFor a ~ 'Ptr (PtrReprFor (ReprFor a)), Untyped (ReprFor a) ~ UntypedPtr (PtrReprFor (ReprFor a)), IsPtrRepr (PtrReprFor (ReprFor a))) -- | The default value for this type. def :: Default a => a