Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides an idiomatic Haskell interface for untyped capnp data, based on algebraic datatypes. It forgoes some of the benefits of the capnp wire format in favor of a more convienient API.
In addition to the algebraic data types themselves, this module also provides support for converting from the lower-level types in Capnp.Untyped.
Documentation
A one of a struct's sections (data or pointer).
This is just a newtype wrapper around ListOf
(which is itself just
Vector
), but critically the notion of equality is different. Two
slices are considered equal if all of their elements are equal, but
If the slices are different lengths, missing elements are treated as
having default values. Accordingly, equality is only defined if the
element type is an instance of Default
.
Instances
Functor Slice Source # | |
IsList (Slice a) Source # | |
(Default a, Eq a) => Eq (Slice a) Source # | |
(Ord a, Default a) => Ord (Slice a) Source # | |
Show a => Show (Slice a) Source # | |
Generic (Slice a) Source # | |
Default (Slice a) Source # | |
Defined in Capnp.Untyped.Pure | |
type Rep (Slice a) Source # | |
Defined in Capnp.Untyped.Pure | |
type Item (Slice a) Source # | |
Defined in Capnp.Untyped.Pure |
A capnproto pointer type.
Instances
Eq Ptr Source # | |
Show Ptr Source # | |
Generic Ptr Source # | |
Cerialize (Maybe Ptr) Source # | |
Decerialize (Maybe Ptr) Source # | |
type Rep Ptr Source # | |
Defined in Capnp.Untyped.Pure type Rep Ptr = D1 (MetaData "Ptr" "Capnp.Untyped.Pure" "capnp-0.4.0.0-3jwue4xLIKz5NlFBMu53Qs" False) (C1 (MetaCons "PtrStruct" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Struct)) :+: (C1 (MetaCons "PtrList" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 List)) :+: C1 (MetaCons "PtrCap" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Client)))) | |
type Cerial msg (Maybe Ptr) Source # | |
A capnproto struct.
Struct | |
|
Instances
Eq Struct Source # | |
Show Struct Source # | |
Generic Struct Source # | |
Default Struct Source # | |
Defined in Capnp.Untyped.Pure | |
Cerialize Struct Source # | |
Marshal Struct Source # | |
Defined in Capnp.Untyped.Pure | |
Decerialize Struct Source # | |
FromStruct ConstMsg Struct Source # | |
Defined in Capnp.Untyped.Pure | |
type Rep Struct Source # | |
Defined in Capnp.Untyped.Pure type Rep Struct = D1 (MetaData "Struct" "Capnp.Untyped.Pure" "capnp-0.4.0.0-3jwue4xLIKz5NlFBMu53Qs" False) (C1 (MetaCons "Struct" PrefixI True) (S1 (MetaSel (Just "structData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Slice Word64)) :*: S1 (MetaSel (Just "structPtrs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Slice (Maybe Ptr))))) | |
type Cerial msg Struct Source # | |
Defined in Capnp.Untyped.Pure |
An untyped list.
List0 (ListOf ()) | |
List1 (ListOf Bool) | |
List8 (ListOf Word8) | |
List16 (ListOf Word16) | |
List32 (ListOf Word32) | |
List64 (ListOf Word64) | |
ListPtr (ListOf (Maybe Ptr)) | |
ListStruct (ListOf Struct) |