{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-dodgy-exports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
{-# OPTIONS_GHC -Wno-name-shadowing #-}
module Capnp.Gen.Capnp.Schema where
import qualified Capnp.Message as Message
import qualified Capnp.Untyped as Untyped
import qualified Capnp.Basics as Basics
import qualified Capnp.GenHelpers as GenHelpers
import qualified Capnp.Classes as Classes
import qualified GHC.Generics as Generics
import qualified Capnp.Bits as Std_
import qualified Data.Maybe as Std_
import qualified Capnp.GenHelpers.ReExports.Data.ByteString as BS
import qualified Prelude as Std_
import qualified Data.Word as Std_
import qualified Data.Int as Std_
import Prelude ((<$>), (<*>), (>>=))
newtype Node msg
= Node'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node msg)) where
fromStruct :: Struct msg -> m (Node msg)
fromStruct Struct msg
struct = (Node msg -> m (Node msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node msg
forall (msg :: Mutability). Struct msg -> Node msg
Node'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node msg)) where
toStruct :: Node msg -> Struct msg
toStruct (Node'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node mut) mut) where
message :: Node mut -> Message mut
message (Node'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node mut) mut) where
messageDefault :: Message mut -> m (Node mut)
messageDefault Message mut
msg = (Struct mut -> Node mut
forall (msg :: Mutability). Struct msg -> Node msg
Node'newtype_ (Struct mut -> Node mut) -> m (Struct mut) -> m (Node mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Node msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Node msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Node msg
forall (msg :: Mutability). Struct msg -> Node msg
Node'newtype_ (Struct msg -> Node msg) -> m (Struct msg) -> m (Node msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Node (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Node ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Node'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Node (Message.Mut s))) where
new :: Message ('Mut s) -> m (Node ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Node ('Mut s)
forall (msg :: Mutability). Struct msg -> Node msg
Node'newtype_ (Struct ('Mut s) -> Node ('Mut s))
-> m (Struct ('Mut s)) -> m (Node ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
5 Word16
6))
instance (Basics.ListElem mut (Node mut)) where
newtype List mut (Node mut)
= Node'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Node mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Node mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node mut)
Node'List_ (ListOf mut (Struct mut) -> List mut (Node mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Node mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Node mut) -> List mut
toUntypedList (Node'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Node mut) -> Int
length (Node'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Node mut) -> m (Node mut)
index Int
i (Node'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Node mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Node (Message.Mut s))) where
setIndex :: Node ('Mut s) -> Int -> List ('Mut s) (Node ('Mut s)) -> m ()
setIndex (Node'newtype_ Struct ('Mut s)
elt) Int
i (Node'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Node ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s)) -> List ('Mut s) (Node ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node mut)
Node'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Node ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
5 Word16
6 Int
len))
get_Node'id :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Word64)
get_Node'id :: Node msg -> m Word64
get_Node'id (Node'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Node'id :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Node'id :: Node ('Mut s) -> Word64 -> m ()
set_Node'id (Node'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
get_Node'displayName :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Node msg) -> (m (Basics.Text msg))
get_Node'displayName :: Node msg -> m (Text msg)
get_Node'displayName (Node'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'displayName :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Node'displayName :: Node ('Mut s) -> Text ('Mut s) -> m ()
set_Node'displayName (Node'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Node'displayName :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
has_Node'displayName :: Node msg -> m Bool
has_Node'displayName (Node'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Node'displayName :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_Node'displayName :: Int -> Node ('Mut s) -> m (Text ('Mut s))
new_Node'displayName Int
len Node ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Node ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node ('Mut s)
struct) Int
len)
(Node ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Node ('Mut s) -> Text ('Mut s) -> m ()
set_Node'displayName Node ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_Node'displayNamePrefixLength :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Word32)
get_Node'displayNamePrefixLength :: Node msg -> m Word32
get_Node'displayNamePrefixLength (Node'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word32
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
0 Word64
0)
set_Node'displayNamePrefixLength :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word32 -> (m ())
set_Node'displayNamePrefixLength :: Node ('Mut s) -> Word32 -> m ()
set_Node'displayNamePrefixLength (Node'newtype_ Struct ('Mut s)
struct) Word32
value = (Struct ('Mut s) -> Word32 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word32 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word32
value)) :: Std_.Word32) Int
1 Int
0 Word64
0)
get_Node'scopeId :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Word64)
get_Node'scopeId :: Node msg -> m Word64
get_Node'scopeId (Node'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
2 Int
0 Word64
0)
set_Node'scopeId :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Node'scopeId :: Node ('Mut s) -> Word64 -> m ()
set_Node'scopeId (Node'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
2 Int
0 Word64
0)
get_Node'nestedNodes :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Node'NestedNode msg)))) => (Node msg) -> (m (Basics.List msg (Node'NestedNode msg)))
get_Node'nestedNodes :: Node msg -> m (List msg (Node'NestedNode msg))
get_Node'nestedNodes (Node'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg
-> Maybe (Ptr msg) -> m (List msg (Node'NestedNode msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'nestedNodes :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'NestedNode (Message.Mut s))))) => (Node (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'NestedNode (Message.Mut s))) -> (m ())
set_Node'nestedNodes :: Node ('Mut s) -> List ('Mut s) (Node'NestedNode ('Mut s)) -> m ()
set_Node'nestedNodes (Node'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Node'NestedNode ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Node'NestedNode ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Node'NestedNode ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_Node'nestedNodes :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
has_Node'nestedNodes :: Node msg -> m Bool
has_Node'nestedNodes (Node'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_Node'nestedNodes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'NestedNode (Message.Mut s))))
new_Node'nestedNodes :: Int
-> Node ('Mut s) -> m (List ('Mut s) (Node'NestedNode ('Mut s)))
new_Node'nestedNodes Int
len Node ('Mut s)
struct = (do
List ('Mut s) (Node'NestedNode ('Mut s))
result <- (Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'NestedNode ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node ('Mut s)
struct) Int
len)
(Node ('Mut s) -> List ('Mut s) (Node'NestedNode ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Node'NestedNode ('Mut s)))) =>
Node ('Mut s) -> List ('Mut s) (Node'NestedNode ('Mut s)) -> m ()
set_Node'nestedNodes Node ('Mut s)
struct List ('Mut s) (Node'NestedNode ('Mut s))
result)
(List ('Mut s) (Node'NestedNode ('Mut s))
-> m (List ('Mut s) (Node'NestedNode ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Node'NestedNode ('Mut s))
result)
)
get_Node'annotations :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Node msg) -> (m (Basics.List msg (Annotation msg)))
get_Node'annotations :: Node msg -> m (List msg (Annotation msg))
get_Node'annotations (Node'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Annotation msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'annotations :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Node (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
set_Node'annotations :: Node ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Node'annotations (Node'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Annotation ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
2 Struct ('Mut s)
struct)
)
has_Node'annotations :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
has_Node'annotations :: Node msg -> m Bool
has_Node'annotations (Node'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct))
new_Node'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
new_Node'annotations :: Int -> Node ('Mut s) -> m (List ('Mut s) (Annotation ('Mut s)))
new_Node'annotations Int
len Node ('Mut s)
struct = (do
List ('Mut s) (Annotation ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Annotation ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node ('Mut s)
struct) Int
len)
(Node ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Annotation ('Mut s)))) =>
Node ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Node'annotations Node ('Mut s)
struct List ('Mut s) (Annotation ('Mut s))
result)
(List ('Mut s) (Annotation ('Mut s))
-> m (List ('Mut s) (Annotation ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Annotation ('Mut s))
result)
)
get_Node'parameters :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Node'Parameter msg)))) => (Node msg) -> (m (Basics.List msg (Node'Parameter msg)))
get_Node'parameters :: Node msg -> m (List msg (Node'Parameter msg))
get_Node'parameters (Node'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
5 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Node'Parameter msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'parameters :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))) => (Node (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))) -> (m ())
set_Node'parameters :: Node ('Mut s) -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
set_Node'parameters (Node'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Node'Parameter ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Node'Parameter ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Node'Parameter ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
5 Struct ('Mut s)
struct)
)
has_Node'parameters :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
has_Node'parameters :: Node msg -> m Bool
has_Node'parameters (Node'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
5 Struct msg
struct))
new_Node'parameters :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))
new_Node'parameters :: Int -> Node ('Mut s) -> m (List ('Mut s) (Node'Parameter ('Mut s)))
new_Node'parameters Int
len Node ('Mut s)
struct = (do
List ('Mut s) (Node'Parameter ('Mut s))
result <- (Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'Parameter ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node ('Mut s)
struct) Int
len)
(Node ('Mut s) -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Node'Parameter ('Mut s)))) =>
Node ('Mut s) -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
set_Node'parameters Node ('Mut s)
struct List ('Mut s) (Node'Parameter ('Mut s))
result)
(List ('Mut s) (Node'Parameter ('Mut s))
-> m (List ('Mut s) (Node'Parameter ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Node'Parameter ('Mut s))
result)
)
get_Node'isGeneric :: ((Untyped.ReadCtx m msg)) => (Node msg) -> (m Std_.Bool)
get_Node'isGeneric :: Node msg -> m Bool
get_Node'isGeneric (Node'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
4 Int
32 Word64
0)
set_Node'isGeneric :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'isGeneric :: Node ('Mut s) -> Bool -> m ()
set_Node'isGeneric (Node'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
4 Int
32 Word64
0)
data Node' (mut :: Message.Mutability)
= Node'file
| Node'struct (Node'struct mut)
| Node'enum (Node'enum mut)
| Node'interface (Node'interface mut)
| Node'const (Node'const mut)
| Node'annotation (Node'annotation mut)
| Node'unknown' Std_.Word16
instance (Classes.FromStruct mut (Node' mut)) where
fromStruct :: Struct mut -> m (Node' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
6)
case Word16
tag of
Word16
0 ->
(Node' mut -> m (Node' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Node' mut
forall (mut :: Mutability). Node' mut
Node'file)
Word16
1 ->
(Node'struct mut -> Node' mut
forall (mut :: Mutability). Node'struct mut -> Node' mut
Node'struct (Node'struct mut -> Node' mut)
-> m (Node'struct mut) -> m (Node' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Node'struct mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
2 ->
(Node'enum mut -> Node' mut
forall (mut :: Mutability). Node'enum mut -> Node' mut
Node'enum (Node'enum mut -> Node' mut) -> m (Node'enum mut) -> m (Node' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Node'enum mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
3 ->
(Node'interface mut -> Node' mut
forall (mut :: Mutability). Node'interface mut -> Node' mut
Node'interface (Node'interface mut -> Node' mut)
-> m (Node'interface mut) -> m (Node' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Node'interface mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
4 ->
(Node'const mut -> Node' mut
forall (mut :: Mutability). Node'const mut -> Node' mut
Node'const (Node'const mut -> Node' mut)
-> m (Node'const mut) -> m (Node' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Node'const mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
5 ->
(Node'annotation mut -> Node' mut
forall (mut :: Mutability). Node'annotation mut -> Node' mut
Node'annotation (Node'annotation mut -> Node' mut)
-> m (Node'annotation mut) -> m (Node' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Node'annotation mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
_ ->
(Node' mut -> m (Node' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Node' mut
forall (mut :: Mutability). Word16 -> Node' mut
Node'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Node' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Node' msg))) => (Node msg) -> (m (Node' msg))
get_Node' :: Node msg -> m (Node' msg)
get_Node' (Node'newtype_ Struct msg
struct) = (Struct msg -> m (Node' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Node'file :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> (m ())
set_Node'file :: Node ('Mut s) -> m ()
set_Node'file (Node'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
1 Int
32 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Node'struct :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Node'struct (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'struct (Message.Mut s)))
set_Node'struct :: Node ('Mut s) -> m (Node'struct ('Mut s))
set_Node'struct (Node'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
1 Int
32 Word64
0)
(Struct ('Mut s) -> m (Node'struct ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Node'enum :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Node'enum (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'enum (Message.Mut s)))
set_Node'enum :: Node ('Mut s) -> m (Node'enum ('Mut s))
set_Node'enum (Node'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
2 :: Std_.Word16) Int
1 Int
32 Word64
0)
(Struct ('Mut s) -> m (Node'enum ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Node'interface :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Node'interface (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'interface (Message.Mut s)))
set_Node'interface :: Node ('Mut s) -> m (Node'interface ('Mut s))
set_Node'interface (Node'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
3 :: Std_.Word16) Int
1 Int
32 Word64
0)
(Struct ('Mut s) -> m (Node'interface ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Node'const :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Node'const (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'const (Message.Mut s)))
set_Node'const :: Node ('Mut s) -> m (Node'const ('Mut s))
set_Node'const (Node'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
4 :: Std_.Word16) Int
1 Int
32 Word64
0)
(Struct ('Mut s) -> m (Node'const ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Node'annotation :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Node'annotation (Message.Mut s)))) => (Node (Message.Mut s)) -> (m (Node'annotation (Message.Mut s)))
set_Node'annotation :: Node ('Mut s) -> m (Node'annotation ('Mut s))
set_Node'annotation (Node'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
5 :: Std_.Word16) Int
1 Int
32 Word64
0)
(Struct ('Mut s) -> m (Node'annotation ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Node'unknown' :: ((Untyped.RWCtx m s)) => (Node (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Node'unknown' :: Node ('Mut s) -> Word16 -> m ()
set_Node'unknown' (Node'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
32 Word64
0)
newtype Node'struct msg
= Node'struct'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'struct msg)) where
fromStruct :: Struct msg -> m (Node'struct msg)
fromStruct Struct msg
struct = (Node'struct msg -> m (Node'struct msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'struct msg
forall (msg :: Mutability). Struct msg -> Node'struct msg
Node'struct'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'struct msg)) where
toStruct :: Node'struct msg -> Struct msg
toStruct (Node'struct'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'struct mut) mut) where
message :: Node'struct mut -> Message mut
message (Node'struct'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'struct mut) mut) where
messageDefault :: Message mut -> m (Node'struct mut)
messageDefault Message mut
msg = (Struct mut -> Node'struct mut
forall (msg :: Mutability). Struct msg -> Node'struct msg
Node'struct'newtype_ (Struct mut -> Node'struct mut)
-> m (Struct mut) -> m (Node'struct mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Node'struct'dataWordCount :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word16)
get_Node'struct'dataWordCount :: Node'struct msg -> m Word16
get_Node'struct'dataWordCount (Node'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
48 Word64
0)
set_Node'struct'dataWordCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Node'struct'dataWordCount :: Node'struct ('Mut s) -> Word16 -> m ()
set_Node'struct'dataWordCount (Node'struct'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
48 Word64
0)
get_Node'struct'pointerCount :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word16)
get_Node'struct'pointerCount :: Node'struct msg -> m Word16
get_Node'struct'pointerCount (Node'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
3 Int
0 Word64
0)
set_Node'struct'pointerCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Node'struct'pointerCount :: Node'struct ('Mut s) -> Word16 -> m ()
set_Node'struct'pointerCount (Node'struct'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
3 Int
0 Word64
0)
get_Node'struct'preferredListEncoding :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m ElementSize)
get_Node'struct'preferredListEncoding :: Node'struct msg -> m ElementSize
get_Node'struct'preferredListEncoding (Node'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m ElementSize
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
3 Int
16 Word64
0)
set_Node'struct'preferredListEncoding :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> ElementSize -> (m ())
set_Node'struct'preferredListEncoding :: Node'struct ('Mut s) -> ElementSize -> m ()
set_Node'struct'preferredListEncoding (Node'struct'newtype_ Struct ('Mut s)
struct) ElementSize
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (ElementSize -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord ElementSize
value)) :: Std_.Word16) Int
3 Int
16 Word64
0)
get_Node'struct'isGroup :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Bool)
get_Node'struct'isGroup :: Node'struct msg -> m Bool
get_Node'struct'isGroup (Node'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
3 Int
32 Word64
0)
set_Node'struct'isGroup :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'struct'isGroup :: Node'struct ('Mut s) -> Bool -> m ()
set_Node'struct'isGroup (Node'struct'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
3 Int
32 Word64
0)
get_Node'struct'discriminantCount :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word16)
get_Node'struct'discriminantCount :: Node'struct msg -> m Word16
get_Node'struct'discriminantCount (Node'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
3 Int
48 Word64
0)
set_Node'struct'discriminantCount :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Node'struct'discriminantCount :: Node'struct ('Mut s) -> Word16 -> m ()
set_Node'struct'discriminantCount (Node'struct'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
3 Int
48 Word64
0)
get_Node'struct'discriminantOffset :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Word32)
get_Node'struct'discriminantOffset :: Node'struct msg -> m Word32
get_Node'struct'discriminantOffset (Node'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word32
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
4 Int
0 Word64
0)
set_Node'struct'discriminantOffset :: ((Untyped.RWCtx m s)) => (Node'struct (Message.Mut s)) -> Std_.Word32 -> (m ())
set_Node'struct'discriminantOffset :: Node'struct ('Mut s) -> Word32 -> m ()
set_Node'struct'discriminantOffset (Node'struct'newtype_ Struct ('Mut s)
struct) Word32
value = (Struct ('Mut s) -> Word32 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word32 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word32
value)) :: Std_.Word32) Int
4 Int
0 Word64
0)
get_Node'struct'fields :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Field msg)))) => (Node'struct msg) -> (m (Basics.List msg (Field msg)))
get_Node'struct'fields :: Node'struct msg -> m (List msg (Field msg))
get_Node'struct'fields (Node'struct'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Field msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'struct'fields :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Field (Message.Mut s))))) => (Node'struct (Message.Mut s)) -> (Basics.List (Message.Mut s) (Field (Message.Mut s))) -> (m ())
set_Node'struct'fields :: Node'struct ('Mut s) -> List ('Mut s) (Field ('Mut s)) -> m ()
set_Node'struct'fields (Node'struct'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Field ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Field ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Field ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Node'struct'fields :: ((Untyped.ReadCtx m msg)) => (Node'struct msg) -> (m Std_.Bool)
has_Node'struct'fields :: Node'struct msg -> m Bool
has_Node'struct'fields (Node'struct'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Node'struct'fields :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'struct (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Field (Message.Mut s))))
new_Node'struct'fields :: Int -> Node'struct ('Mut s) -> m (List ('Mut s) (Field ('Mut s)))
new_Node'struct'fields Int
len Node'struct ('Mut s)
struct = (do
List ('Mut s) (Field ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Field ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node'struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'struct ('Mut s)
struct) Int
len)
(Node'struct ('Mut s) -> List ('Mut s) (Field ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Field ('Mut s)))) =>
Node'struct ('Mut s) -> List ('Mut s) (Field ('Mut s)) -> m ()
set_Node'struct'fields Node'struct ('Mut s)
struct List ('Mut s) (Field ('Mut s))
result)
(List ('Mut s) (Field ('Mut s))
-> m (List ('Mut s) (Field ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Field ('Mut s))
result)
)
newtype Node'enum msg
= Node'enum'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'enum msg)) where
fromStruct :: Struct msg -> m (Node'enum msg)
fromStruct Struct msg
struct = (Node'enum msg -> m (Node'enum msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'enum msg
forall (msg :: Mutability). Struct msg -> Node'enum msg
Node'enum'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'enum msg)) where
toStruct :: Node'enum msg -> Struct msg
toStruct (Node'enum'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'enum mut) mut) where
message :: Node'enum mut -> Message mut
message (Node'enum'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'enum mut) mut) where
messageDefault :: Message mut -> m (Node'enum mut)
messageDefault Message mut
msg = (Struct mut -> Node'enum mut
forall (msg :: Mutability). Struct msg -> Node'enum msg
Node'enum'newtype_ (Struct mut -> Node'enum mut)
-> m (Struct mut) -> m (Node'enum mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Node'enum'enumerants :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Enumerant msg)))) => (Node'enum msg) -> (m (Basics.List msg (Enumerant msg)))
get_Node'enum'enumerants :: Node'enum msg -> m (List msg (Enumerant msg))
get_Node'enum'enumerants (Node'enum'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Enumerant msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'enum'enumerants :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Enumerant (Message.Mut s))))) => (Node'enum (Message.Mut s)) -> (Basics.List (Message.Mut s) (Enumerant (Message.Mut s))) -> (m ())
set_Node'enum'enumerants :: Node'enum ('Mut s) -> List ('Mut s) (Enumerant ('Mut s)) -> m ()
set_Node'enum'enumerants (Node'enum'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Enumerant ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Enumerant ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Enumerant ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Node'enum'enumerants :: ((Untyped.ReadCtx m msg)) => (Node'enum msg) -> (m Std_.Bool)
has_Node'enum'enumerants :: Node'enum msg -> m Bool
has_Node'enum'enumerants (Node'enum'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Node'enum'enumerants :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'enum (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Enumerant (Message.Mut s))))
new_Node'enum'enumerants :: Int -> Node'enum ('Mut s) -> m (List ('Mut s) (Enumerant ('Mut s)))
new_Node'enum'enumerants Int
len Node'enum ('Mut s)
struct = (do
List ('Mut s) (Enumerant ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Enumerant ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node'enum ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'enum ('Mut s)
struct) Int
len)
(Node'enum ('Mut s) -> List ('Mut s) (Enumerant ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Enumerant ('Mut s)))) =>
Node'enum ('Mut s) -> List ('Mut s) (Enumerant ('Mut s)) -> m ()
set_Node'enum'enumerants Node'enum ('Mut s)
struct List ('Mut s) (Enumerant ('Mut s))
result)
(List ('Mut s) (Enumerant ('Mut s))
-> m (List ('Mut s) (Enumerant ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Enumerant ('Mut s))
result)
)
newtype Node'interface msg
= Node'interface'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'interface msg)) where
fromStruct :: Struct msg -> m (Node'interface msg)
fromStruct Struct msg
struct = (Node'interface msg -> m (Node'interface msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'interface msg
forall (msg :: Mutability). Struct msg -> Node'interface msg
Node'interface'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'interface msg)) where
toStruct :: Node'interface msg -> Struct msg
toStruct (Node'interface'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'interface mut) mut) where
message :: Node'interface mut -> Message mut
message (Node'interface'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'interface mut) mut) where
messageDefault :: Message mut -> m (Node'interface mut)
messageDefault Message mut
msg = (Struct mut -> Node'interface mut
forall (msg :: Mutability). Struct msg -> Node'interface msg
Node'interface'newtype_ (Struct mut -> Node'interface mut)
-> m (Struct mut) -> m (Node'interface mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Node'interface'methods :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Method msg)))) => (Node'interface msg) -> (m (Basics.List msg (Method msg)))
get_Node'interface'methods :: Node'interface msg -> m (List msg (Method msg))
get_Node'interface'methods (Node'interface'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Method msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'interface'methods :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Method (Message.Mut s))))) => (Node'interface (Message.Mut s)) -> (Basics.List (Message.Mut s) (Method (Message.Mut s))) -> (m ())
set_Node'interface'methods :: Node'interface ('Mut s) -> List ('Mut s) (Method ('Mut s)) -> m ()
set_Node'interface'methods (Node'interface'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Method ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Method ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Method ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Node'interface'methods :: ((Untyped.ReadCtx m msg)) => (Node'interface msg) -> (m Std_.Bool)
has_Node'interface'methods :: Node'interface msg -> m Bool
has_Node'interface'methods (Node'interface'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Node'interface'methods :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'interface (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Method (Message.Mut s))))
new_Node'interface'methods :: Int
-> Node'interface ('Mut s) -> m (List ('Mut s) (Method ('Mut s)))
new_Node'interface'methods Int
len Node'interface ('Mut s)
struct = (do
List ('Mut s) (Method ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Method ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node'interface ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'interface ('Mut s)
struct) Int
len)
(Node'interface ('Mut s) -> List ('Mut s) (Method ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Method ('Mut s)))) =>
Node'interface ('Mut s) -> List ('Mut s) (Method ('Mut s)) -> m ()
set_Node'interface'methods Node'interface ('Mut s)
struct List ('Mut s) (Method ('Mut s))
result)
(List ('Mut s) (Method ('Mut s))
-> m (List ('Mut s) (Method ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Method ('Mut s))
result)
)
get_Node'interface'superclasses :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Superclass msg)))) => (Node'interface msg) -> (m (Basics.List msg (Superclass msg)))
get_Node'interface'superclasses :: Node'interface msg -> m (List msg (Superclass msg))
get_Node'interface'superclasses (Node'interface'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
4 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Superclass msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'interface'superclasses :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Superclass (Message.Mut s))))) => (Node'interface (Message.Mut s)) -> (Basics.List (Message.Mut s) (Superclass (Message.Mut s))) -> (m ())
set_Node'interface'superclasses :: Node'interface ('Mut s)
-> List ('Mut s) (Superclass ('Mut s)) -> m ()
set_Node'interface'superclasses (Node'interface'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Superclass ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Superclass ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Superclass ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
4 Struct ('Mut s)
struct)
)
has_Node'interface'superclasses :: ((Untyped.ReadCtx m msg)) => (Node'interface msg) -> (m Std_.Bool)
has_Node'interface'superclasses :: Node'interface msg -> m Bool
has_Node'interface'superclasses (Node'interface'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
4 Struct msg
struct))
new_Node'interface'superclasses :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'interface (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Superclass (Message.Mut s))))
new_Node'interface'superclasses :: Int
-> Node'interface ('Mut s)
-> m (List ('Mut s) (Superclass ('Mut s)))
new_Node'interface'superclasses Int
len Node'interface ('Mut s)
struct = (do
List ('Mut s) (Superclass ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Superclass ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node'interface ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'interface ('Mut s)
struct) Int
len)
(Node'interface ('Mut s)
-> List ('Mut s) (Superclass ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Superclass ('Mut s)))) =>
Node'interface ('Mut s)
-> List ('Mut s) (Superclass ('Mut s)) -> m ()
set_Node'interface'superclasses Node'interface ('Mut s)
struct List ('Mut s) (Superclass ('Mut s))
result)
(List ('Mut s) (Superclass ('Mut s))
-> m (List ('Mut s) (Superclass ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Superclass ('Mut s))
result)
)
newtype Node'const msg
= Node'const'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'const msg)) where
fromStruct :: Struct msg -> m (Node'const msg)
fromStruct Struct msg
struct = (Node'const msg -> m (Node'const msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'const msg
forall (msg :: Mutability). Struct msg -> Node'const msg
Node'const'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'const msg)) where
toStruct :: Node'const msg -> Struct msg
toStruct (Node'const'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'const mut) mut) where
message :: Node'const mut -> Message mut
message (Node'const'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'const mut) mut) where
messageDefault :: Message mut -> m (Node'const mut)
messageDefault Message mut
msg = (Struct mut -> Node'const mut
forall (msg :: Mutability). Struct msg -> Node'const msg
Node'const'newtype_ (Struct mut -> Node'const mut)
-> m (Struct mut) -> m (Node'const mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Node'const'type_ :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Type msg))) => (Node'const msg) -> (m (Type msg))
get_Node'const'type_ :: Node'const msg -> m (Type msg)
get_Node'const'type_ (Node'const'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Type msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'const'type_ :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Type (Message.Mut s)))) => (Node'const (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
set_Node'const'type_ :: Node'const ('Mut s) -> Type ('Mut s) -> m ()
set_Node'const'type_ (Node'const'newtype_ Struct ('Mut s)
struct) Type ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Type ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Type ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Node'const'type_ :: ((Untyped.ReadCtx m msg)) => (Node'const msg) -> (m Std_.Bool)
has_Node'const'type_ :: Node'const msg -> m Bool
has_Node'const'type_ (Node'const'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Node'const'type_ :: ((Untyped.RWCtx m s)) => (Node'const (Message.Mut s)) -> (m (Type (Message.Mut s)))
new_Node'const'type_ :: Node'const ('Mut s) -> m (Type ('Mut s))
new_Node'const'type_ Node'const ('Mut s)
struct = (do
Type ('Mut s)
result <- (Message ('Mut s) -> m (Type ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Node'const ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'const ('Mut s)
struct))
(Node'const ('Mut s) -> Type ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Type ('Mut s))) =>
Node'const ('Mut s) -> Type ('Mut s) -> m ()
set_Node'const'type_ Node'const ('Mut s)
struct Type ('Mut s)
result)
(Type ('Mut s) -> m (Type ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type ('Mut s)
result)
)
get_Node'const'value :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Value msg))) => (Node'const msg) -> (m (Value msg))
get_Node'const'value :: Node'const msg -> m (Value msg)
get_Node'const'value (Node'const'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
4 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Value msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'const'value :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Value (Message.Mut s)))) => (Node'const (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
set_Node'const'value :: Node'const ('Mut s) -> Value ('Mut s) -> m ()
set_Node'const'value (Node'const'newtype_ Struct ('Mut s)
struct) Value ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Value ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Value ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
4 Struct ('Mut s)
struct)
)
has_Node'const'value :: ((Untyped.ReadCtx m msg)) => (Node'const msg) -> (m Std_.Bool)
has_Node'const'value :: Node'const msg -> m Bool
has_Node'const'value (Node'const'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
4 Struct msg
struct))
new_Node'const'value :: ((Untyped.RWCtx m s)) => (Node'const (Message.Mut s)) -> (m (Value (Message.Mut s)))
new_Node'const'value :: Node'const ('Mut s) -> m (Value ('Mut s))
new_Node'const'value Node'const ('Mut s)
struct = (do
Value ('Mut s)
result <- (Message ('Mut s) -> m (Value ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Node'const ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'const ('Mut s)
struct))
(Node'const ('Mut s) -> Value ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Value ('Mut s))) =>
Node'const ('Mut s) -> Value ('Mut s) -> m ()
set_Node'const'value Node'const ('Mut s)
struct Value ('Mut s)
result)
(Value ('Mut s) -> m (Value ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Value ('Mut s)
result)
)
newtype Node'annotation msg
= Node'annotation'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'annotation msg)) where
fromStruct :: Struct msg -> m (Node'annotation msg)
fromStruct Struct msg
struct = (Node'annotation msg -> m (Node'annotation msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'annotation msg
forall (msg :: Mutability). Struct msg -> Node'annotation msg
Node'annotation'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'annotation msg)) where
toStruct :: Node'annotation msg -> Struct msg
toStruct (Node'annotation'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'annotation mut) mut) where
message :: Node'annotation mut -> Message mut
message (Node'annotation'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'annotation mut) mut) where
messageDefault :: Message mut -> m (Node'annotation mut)
messageDefault Message mut
msg = (Struct mut -> Node'annotation mut
forall (msg :: Mutability). Struct msg -> Node'annotation msg
Node'annotation'newtype_ (Struct mut -> Node'annotation mut)
-> m (Struct mut) -> m (Node'annotation mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Node'annotation'type_ :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Type msg))) => (Node'annotation msg) -> (m (Type msg))
get_Node'annotation'type_ :: Node'annotation msg -> m (Type msg)
get_Node'annotation'type_ (Node'annotation'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Type msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'annotation'type_ :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Type (Message.Mut s)))) => (Node'annotation (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
set_Node'annotation'type_ :: Node'annotation ('Mut s) -> Type ('Mut s) -> m ()
set_Node'annotation'type_ (Node'annotation'newtype_ Struct ('Mut s)
struct) Type ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Type ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Type ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Node'annotation'type_ :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
has_Node'annotation'type_ :: Node'annotation msg -> m Bool
has_Node'annotation'type_ (Node'annotation'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Node'annotation'type_ :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> (m (Type (Message.Mut s)))
new_Node'annotation'type_ :: Node'annotation ('Mut s) -> m (Type ('Mut s))
new_Node'annotation'type_ Node'annotation ('Mut s)
struct = (do
Type ('Mut s)
result <- (Message ('Mut s) -> m (Type ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Node'annotation ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'annotation ('Mut s)
struct))
(Node'annotation ('Mut s) -> Type ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Type ('Mut s))) =>
Node'annotation ('Mut s) -> Type ('Mut s) -> m ()
set_Node'annotation'type_ Node'annotation ('Mut s)
struct Type ('Mut s)
result)
(Type ('Mut s) -> m (Type ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type ('Mut s)
result)
)
get_Node'annotation'targetsFile :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsFile :: Node'annotation msg -> m Bool
get_Node'annotation'targetsFile (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
48 Word64
0)
set_Node'annotation'targetsFile :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsFile :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsFile (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
48 Word64
0)
get_Node'annotation'targetsConst :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsConst :: Node'annotation msg -> m Bool
get_Node'annotation'targetsConst (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
49 Word64
0)
set_Node'annotation'targetsConst :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsConst :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsConst (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
49 Word64
0)
get_Node'annotation'targetsEnum :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsEnum :: Node'annotation msg -> m Bool
get_Node'annotation'targetsEnum (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
50 Word64
0)
set_Node'annotation'targetsEnum :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsEnum :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsEnum (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
50 Word64
0)
get_Node'annotation'targetsEnumerant :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsEnumerant :: Node'annotation msg -> m Bool
get_Node'annotation'targetsEnumerant (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
51 Word64
0)
set_Node'annotation'targetsEnumerant :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsEnumerant :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsEnumerant (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
51 Word64
0)
get_Node'annotation'targetsStruct :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsStruct :: Node'annotation msg -> m Bool
get_Node'annotation'targetsStruct (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
52 Word64
0)
set_Node'annotation'targetsStruct :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsStruct :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsStruct (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
52 Word64
0)
get_Node'annotation'targetsField :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsField :: Node'annotation msg -> m Bool
get_Node'annotation'targetsField (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
53 Word64
0)
set_Node'annotation'targetsField :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsField :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsField (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
53 Word64
0)
get_Node'annotation'targetsUnion :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsUnion :: Node'annotation msg -> m Bool
get_Node'annotation'targetsUnion (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
54 Word64
0)
set_Node'annotation'targetsUnion :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsUnion :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsUnion (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
54 Word64
0)
get_Node'annotation'targetsGroup :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsGroup :: Node'annotation msg -> m Bool
get_Node'annotation'targetsGroup (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
55 Word64
0)
set_Node'annotation'targetsGroup :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsGroup :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsGroup (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
55 Word64
0)
get_Node'annotation'targetsInterface :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsInterface :: Node'annotation msg -> m Bool
get_Node'annotation'targetsInterface (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
56 Word64
0)
set_Node'annotation'targetsInterface :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsInterface :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsInterface (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
56 Word64
0)
get_Node'annotation'targetsMethod :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsMethod :: Node'annotation msg -> m Bool
get_Node'annotation'targetsMethod (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
57 Word64
0)
set_Node'annotation'targetsMethod :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsMethod :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsMethod (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
57 Word64
0)
get_Node'annotation'targetsParam :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsParam :: Node'annotation msg -> m Bool
get_Node'annotation'targetsParam (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
58 Word64
0)
set_Node'annotation'targetsParam :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsParam :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsParam (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
58 Word64
0)
get_Node'annotation'targetsAnnotation :: ((Untyped.ReadCtx m msg)) => (Node'annotation msg) -> (m Std_.Bool)
get_Node'annotation'targetsAnnotation :: Node'annotation msg -> m Bool
get_Node'annotation'targetsAnnotation (Node'annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
59 Word64
0)
set_Node'annotation'targetsAnnotation :: ((Untyped.RWCtx m s)) => (Node'annotation (Message.Mut s)) -> Std_.Bool -> (m ())
set_Node'annotation'targetsAnnotation :: Node'annotation ('Mut s) -> Bool -> m ()
set_Node'annotation'targetsAnnotation (Node'annotation'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
1 Int
59 Word64
0)
newtype Node'Parameter msg
= Node'Parameter'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'Parameter msg)) where
fromStruct :: Struct msg -> m (Node'Parameter msg)
fromStruct Struct msg
struct = (Node'Parameter msg -> m (Node'Parameter msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'Parameter msg
forall (msg :: Mutability). Struct msg -> Node'Parameter msg
Node'Parameter'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'Parameter msg)) where
toStruct :: Node'Parameter msg -> Struct msg
toStruct (Node'Parameter'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'Parameter mut) mut) where
message :: Node'Parameter mut -> Message mut
message (Node'Parameter'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'Parameter mut) mut) where
messageDefault :: Message mut -> m (Node'Parameter mut)
messageDefault Message mut
msg = (Struct mut -> Node'Parameter mut
forall (msg :: Mutability). Struct msg -> Node'Parameter msg
Node'Parameter'newtype_ (Struct mut -> Node'Parameter mut)
-> m (Struct mut) -> m (Node'Parameter mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Node'Parameter msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Node'Parameter msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Node'Parameter msg
forall (msg :: Mutability). Struct msg -> Node'Parameter msg
Node'Parameter'newtype_ (Struct msg -> Node'Parameter msg)
-> m (Struct msg) -> m (Node'Parameter msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Node'Parameter (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> Node'Parameter ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Node'Parameter'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Node'Parameter (Message.Mut s))) where
new :: Message ('Mut s) -> m (Node'Parameter ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Node'Parameter ('Mut s)
forall (msg :: Mutability). Struct msg -> Node'Parameter msg
Node'Parameter'newtype_ (Struct ('Mut s) -> Node'Parameter ('Mut s))
-> m (Struct ('Mut s)) -> m (Node'Parameter ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
0 Word16
1))
instance (Basics.ListElem mut (Node'Parameter mut)) where
newtype List mut (Node'Parameter mut)
= Node'Parameter'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Node'Parameter mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Node'Parameter mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'Parameter mut)
Node'Parameter'List_ (ListOf mut (Struct mut) -> List mut (Node'Parameter mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Node'Parameter mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Node'Parameter mut) -> List mut
toUntypedList (Node'Parameter'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Node'Parameter mut) -> Int
length (Node'Parameter'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Node'Parameter mut) -> m (Node'Parameter mut)
index Int
i (Node'Parameter'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Node'Parameter mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Node'Parameter (Message.Mut s))) where
setIndex :: Node'Parameter ('Mut s)
-> Int -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
setIndex (Node'Parameter'newtype_ Struct ('Mut s)
elt) Int
i (Node'Parameter'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'Parameter ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'Parameter ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'Parameter mut)
Node'Parameter'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'Parameter ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Node'Parameter ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
0 Word16
1 Int
len))
get_Node'Parameter'name :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Node'Parameter msg) -> (m (Basics.Text msg))
get_Node'Parameter'name :: Node'Parameter msg -> m (Text msg)
get_Node'Parameter'name (Node'Parameter'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'Parameter'name :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'Parameter (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Node'Parameter'name :: Node'Parameter ('Mut s) -> Text ('Mut s) -> m ()
set_Node'Parameter'name (Node'Parameter'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Node'Parameter'name :: ((Untyped.ReadCtx m msg)) => (Node'Parameter msg) -> (m Std_.Bool)
has_Node'Parameter'name :: Node'Parameter msg -> m Bool
has_Node'Parameter'name (Node'Parameter'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Node'Parameter'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'Parameter (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_Node'Parameter'name :: Int -> Node'Parameter ('Mut s) -> m (Text ('Mut s))
new_Node'Parameter'name Int
len Node'Parameter ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Node'Parameter ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'Parameter ('Mut s)
struct) Int
len)
(Node'Parameter ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Node'Parameter ('Mut s) -> Text ('Mut s) -> m ()
set_Node'Parameter'name Node'Parameter ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
newtype Node'NestedNode msg
= Node'NestedNode'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'NestedNode msg)) where
fromStruct :: Struct msg -> m (Node'NestedNode msg)
fromStruct Struct msg
struct = (Node'NestedNode msg -> m (Node'NestedNode msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'NestedNode msg
forall (msg :: Mutability). Struct msg -> Node'NestedNode msg
Node'NestedNode'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'NestedNode msg)) where
toStruct :: Node'NestedNode msg -> Struct msg
toStruct (Node'NestedNode'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'NestedNode mut) mut) where
message :: Node'NestedNode mut -> Message mut
message (Node'NestedNode'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'NestedNode mut) mut) where
messageDefault :: Message mut -> m (Node'NestedNode mut)
messageDefault Message mut
msg = (Struct mut -> Node'NestedNode mut
forall (msg :: Mutability). Struct msg -> Node'NestedNode msg
Node'NestedNode'newtype_ (Struct mut -> Node'NestedNode mut)
-> m (Struct mut) -> m (Node'NestedNode mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Node'NestedNode msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Node'NestedNode msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Node'NestedNode msg
forall (msg :: Mutability). Struct msg -> Node'NestedNode msg
Node'NestedNode'newtype_ (Struct msg -> Node'NestedNode msg)
-> m (Struct msg) -> m (Node'NestedNode msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Node'NestedNode (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> Node'NestedNode ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Node'NestedNode'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Node'NestedNode (Message.Mut s))) where
new :: Message ('Mut s) -> m (Node'NestedNode ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Node'NestedNode ('Mut s)
forall (msg :: Mutability). Struct msg -> Node'NestedNode msg
Node'NestedNode'newtype_ (Struct ('Mut s) -> Node'NestedNode ('Mut s))
-> m (Struct ('Mut s)) -> m (Node'NestedNode ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
1))
instance (Basics.ListElem mut (Node'NestedNode mut)) where
newtype List mut (Node'NestedNode mut)
= Node'NestedNode'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut
-> Maybe (Ptr mut) -> m (List mut (Node'NestedNode mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Node'NestedNode mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'NestedNode mut)
Node'NestedNode'List_ (ListOf mut (Struct mut) -> List mut (Node'NestedNode mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (Node'NestedNode mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Node'NestedNode mut) -> List mut
toUntypedList (Node'NestedNode'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Node'NestedNode mut) -> Int
length (Node'NestedNode'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Node'NestedNode mut) -> m (Node'NestedNode mut)
index Int
i (Node'NestedNode'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Node'NestedNode mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Node'NestedNode (Message.Mut s))) where
setIndex :: Node'NestedNode ('Mut s)
-> Int -> List ('Mut s) (Node'NestedNode ('Mut s)) -> m ()
setIndex (Node'NestedNode'newtype_ Struct ('Mut s)
elt) Int
i (Node'NestedNode'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'NestedNode ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'NestedNode ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'NestedNode mut)
Node'NestedNode'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'NestedNode ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Node'NestedNode ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
1 Int
len))
get_Node'NestedNode'name :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Node'NestedNode msg) -> (m (Basics.Text msg))
get_Node'NestedNode'name :: Node'NestedNode msg -> m (Text msg)
get_Node'NestedNode'name (Node'NestedNode'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'NestedNode'name :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'NestedNode (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Node'NestedNode'name :: Node'NestedNode ('Mut s) -> Text ('Mut s) -> m ()
set_Node'NestedNode'name (Node'NestedNode'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Node'NestedNode'name :: ((Untyped.ReadCtx m msg)) => (Node'NestedNode msg) -> (m Std_.Bool)
has_Node'NestedNode'name :: Node'NestedNode msg -> m Bool
has_Node'NestedNode'name (Node'NestedNode'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Node'NestedNode'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'NestedNode (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_Node'NestedNode'name :: Int -> Node'NestedNode ('Mut s) -> m (Text ('Mut s))
new_Node'NestedNode'name Int
len Node'NestedNode ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Node'NestedNode ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'NestedNode ('Mut s)
struct) Int
len)
(Node'NestedNode ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Node'NestedNode ('Mut s) -> Text ('Mut s) -> m ()
set_Node'NestedNode'name Node'NestedNode ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_Node'NestedNode'id :: ((Untyped.ReadCtx m msg)) => (Node'NestedNode msg) -> (m Std_.Word64)
get_Node'NestedNode'id :: Node'NestedNode msg -> m Word64
get_Node'NestedNode'id (Node'NestedNode'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Node'NestedNode'id :: ((Untyped.RWCtx m s)) => (Node'NestedNode (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Node'NestedNode'id :: Node'NestedNode ('Mut s) -> Word64 -> m ()
set_Node'NestedNode'id (Node'NestedNode'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
newtype Node'SourceInfo msg
= Node'SourceInfo'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'SourceInfo msg)) where
fromStruct :: Struct msg -> m (Node'SourceInfo msg)
fromStruct Struct msg
struct = (Node'SourceInfo msg -> m (Node'SourceInfo msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'SourceInfo msg
forall (msg :: Mutability). Struct msg -> Node'SourceInfo msg
Node'SourceInfo'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'SourceInfo msg)) where
toStruct :: Node'SourceInfo msg -> Struct msg
toStruct (Node'SourceInfo'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'SourceInfo mut) mut) where
message :: Node'SourceInfo mut -> Message mut
message (Node'SourceInfo'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'SourceInfo mut) mut) where
messageDefault :: Message mut -> m (Node'SourceInfo mut)
messageDefault Message mut
msg = (Struct mut -> Node'SourceInfo mut
forall (msg :: Mutability). Struct msg -> Node'SourceInfo msg
Node'SourceInfo'newtype_ (Struct mut -> Node'SourceInfo mut)
-> m (Struct mut) -> m (Node'SourceInfo mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Node'SourceInfo msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Node'SourceInfo msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Node'SourceInfo msg
forall (msg :: Mutability). Struct msg -> Node'SourceInfo msg
Node'SourceInfo'newtype_ (Struct msg -> Node'SourceInfo msg)
-> m (Struct msg) -> m (Node'SourceInfo msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Node'SourceInfo (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> Node'SourceInfo ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Node'SourceInfo'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Node'SourceInfo (Message.Mut s))) where
new :: Message ('Mut s) -> m (Node'SourceInfo ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Node'SourceInfo ('Mut s)
forall (msg :: Mutability). Struct msg -> Node'SourceInfo msg
Node'SourceInfo'newtype_ (Struct ('Mut s) -> Node'SourceInfo ('Mut s))
-> m (Struct ('Mut s)) -> m (Node'SourceInfo ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
2))
instance (Basics.ListElem mut (Node'SourceInfo mut)) where
newtype List mut (Node'SourceInfo mut)
= Node'SourceInfo'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut
-> Maybe (Ptr mut) -> m (List mut (Node'SourceInfo mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Node'SourceInfo mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'SourceInfo mut)
Node'SourceInfo'List_ (ListOf mut (Struct mut) -> List mut (Node'SourceInfo mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (Node'SourceInfo mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Node'SourceInfo mut) -> List mut
toUntypedList (Node'SourceInfo'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Node'SourceInfo mut) -> Int
length (Node'SourceInfo'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Node'SourceInfo mut) -> m (Node'SourceInfo mut)
index Int
i (Node'SourceInfo'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Node'SourceInfo mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Node'SourceInfo (Message.Mut s))) where
setIndex :: Node'SourceInfo ('Mut s)
-> Int -> List ('Mut s) (Node'SourceInfo ('Mut s)) -> m ()
setIndex (Node'SourceInfo'newtype_ Struct ('Mut s)
elt) Int
i (Node'SourceInfo'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'SourceInfo ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'SourceInfo ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'SourceInfo mut)
Node'SourceInfo'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'SourceInfo ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Node'SourceInfo ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
2 Int
len))
get_Node'SourceInfo'id :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo msg) -> (m Std_.Word64)
get_Node'SourceInfo'id :: Node'SourceInfo msg -> m Word64
get_Node'SourceInfo'id (Node'SourceInfo'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Node'SourceInfo'id :: ((Untyped.RWCtx m s)) => (Node'SourceInfo (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Node'SourceInfo'id :: Node'SourceInfo ('Mut s) -> Word64 -> m ()
set_Node'SourceInfo'id (Node'SourceInfo'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
get_Node'SourceInfo'docComment :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Node'SourceInfo msg) -> (m (Basics.Text msg))
(Node'SourceInfo'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'SourceInfo'docComment :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'SourceInfo (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
(Node'SourceInfo'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Node'SourceInfo'docComment :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo msg) -> (m Std_.Bool)
(Node'SourceInfo'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Node'SourceInfo'docComment :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
Int
len Node'SourceInfo ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Node'SourceInfo ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'SourceInfo ('Mut s)
struct) Int
len)
(Node'SourceInfo ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Node'SourceInfo ('Mut s) -> Text ('Mut s) -> m ()
set_Node'SourceInfo'docComment Node'SourceInfo ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_Node'SourceInfo'members :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Node'SourceInfo'Member msg)))) => (Node'SourceInfo msg) -> (m (Basics.List msg (Node'SourceInfo'Member msg)))
get_Node'SourceInfo'members :: Node'SourceInfo msg -> m (List msg (Node'SourceInfo'Member msg))
get_Node'SourceInfo'members (Node'SourceInfo'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg
-> Maybe (Ptr msg) -> m (List msg (Node'SourceInfo'Member msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'SourceInfo'members :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'SourceInfo'Member (Message.Mut s))))) => (Node'SourceInfo (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'SourceInfo'Member (Message.Mut s))) -> (m ())
set_Node'SourceInfo'members :: Node'SourceInfo ('Mut s)
-> List ('Mut s) (Node'SourceInfo'Member ('Mut s)) -> m ()
set_Node'SourceInfo'members (Node'SourceInfo'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Node'SourceInfo'Member ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Node'SourceInfo'Member ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Node'SourceInfo'Member ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_Node'SourceInfo'members :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo msg) -> (m Std_.Bool)
has_Node'SourceInfo'members :: Node'SourceInfo msg -> m Bool
has_Node'SourceInfo'members (Node'SourceInfo'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_Node'SourceInfo'members :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'SourceInfo'Member (Message.Mut s))))
new_Node'SourceInfo'members :: Int
-> Node'SourceInfo ('Mut s)
-> m (List ('Mut s) (Node'SourceInfo'Member ('Mut s)))
new_Node'SourceInfo'members Int
len Node'SourceInfo ('Mut s)
struct = (do
List ('Mut s) (Node'SourceInfo'Member ('Mut s))
result <- (Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'SourceInfo'Member ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Node'SourceInfo ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'SourceInfo ('Mut s)
struct) Int
len)
(Node'SourceInfo ('Mut s)
-> List ('Mut s) (Node'SourceInfo'Member ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s,
ToPtr s (List ('Mut s) (Node'SourceInfo'Member ('Mut s)))) =>
Node'SourceInfo ('Mut s)
-> List ('Mut s) (Node'SourceInfo'Member ('Mut s)) -> m ()
set_Node'SourceInfo'members Node'SourceInfo ('Mut s)
struct List ('Mut s) (Node'SourceInfo'Member ('Mut s))
result)
(List ('Mut s) (Node'SourceInfo'Member ('Mut s))
-> m (List ('Mut s) (Node'SourceInfo'Member ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Node'SourceInfo'Member ('Mut s))
result)
)
newtype Node'SourceInfo'Member msg
= Node'SourceInfo'Member'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Node'SourceInfo'Member msg)) where
fromStruct :: Struct msg -> m (Node'SourceInfo'Member msg)
fromStruct Struct msg
struct = (Node'SourceInfo'Member msg -> m (Node'SourceInfo'Member msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Node'SourceInfo'Member msg
forall (msg :: Mutability).
Struct msg -> Node'SourceInfo'Member msg
Node'SourceInfo'Member'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Node'SourceInfo'Member msg)) where
toStruct :: Node'SourceInfo'Member msg -> Struct msg
toStruct (Node'SourceInfo'Member'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Node'SourceInfo'Member mut) mut) where
message :: Node'SourceInfo'Member mut -> Message mut
message (Node'SourceInfo'Member'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Node'SourceInfo'Member mut) mut) where
messageDefault :: Message mut -> m (Node'SourceInfo'Member mut)
messageDefault Message mut
msg = (Struct mut -> Node'SourceInfo'Member mut
forall (msg :: Mutability).
Struct msg -> Node'SourceInfo'Member msg
Node'SourceInfo'Member'newtype_ (Struct mut -> Node'SourceInfo'Member mut)
-> m (Struct mut) -> m (Node'SourceInfo'Member mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Node'SourceInfo'Member msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Node'SourceInfo'Member msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Node'SourceInfo'Member msg
forall (msg :: Mutability).
Struct msg -> Node'SourceInfo'Member msg
Node'SourceInfo'Member'newtype_ (Struct msg -> Node'SourceInfo'Member msg)
-> m (Struct msg) -> m (Node'SourceInfo'Member msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Node'SourceInfo'Member (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> Node'SourceInfo'Member ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Node'SourceInfo'Member'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Node'SourceInfo'Member (Message.Mut s))) where
new :: Message ('Mut s) -> m (Node'SourceInfo'Member ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Node'SourceInfo'Member ('Mut s)
forall (msg :: Mutability).
Struct msg -> Node'SourceInfo'Member msg
Node'SourceInfo'Member'newtype_ (Struct ('Mut s) -> Node'SourceInfo'Member ('Mut s))
-> m (Struct ('Mut s)) -> m (Node'SourceInfo'Member ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
0 Word16
1))
instance (Basics.ListElem mut (Node'SourceInfo'Member mut)) where
newtype List mut (Node'SourceInfo'Member mut)
= Node'SourceInfo'Member'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut
-> Maybe (Ptr mut) -> m (List mut (Node'SourceInfo'Member mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Node'SourceInfo'Member mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'SourceInfo'Member mut)
Node'SourceInfo'Member'List_ (ListOf mut (Struct mut) -> List mut (Node'SourceInfo'Member mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (Node'SourceInfo'Member mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Node'SourceInfo'Member mut) -> List mut
toUntypedList (Node'SourceInfo'Member'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Node'SourceInfo'Member mut) -> Int
length (Node'SourceInfo'Member'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int
-> List mut (Node'SourceInfo'Member mut)
-> m (Node'SourceInfo'Member mut)
index Int
i (Node'SourceInfo'Member'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Node'SourceInfo'Member mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Node'SourceInfo'Member (Message.Mut s))) where
setIndex :: Node'SourceInfo'Member ('Mut s)
-> Int -> List ('Mut s) (Node'SourceInfo'Member ('Mut s)) -> m ()
setIndex (Node'SourceInfo'Member'newtype_ Struct ('Mut s)
elt) Int
i (Node'SourceInfo'Member'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'SourceInfo'Member ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'SourceInfo'Member ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Node'SourceInfo'Member mut)
Node'SourceInfo'Member'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Node'SourceInfo'Member ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Node'SourceInfo'Member ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
0 Word16
1 Int
len))
get_Node'SourceInfo'Member'docComment :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Node'SourceInfo'Member msg) -> (m (Basics.Text msg))
(Node'SourceInfo'Member'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Node'SourceInfo'Member'docComment :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Node'SourceInfo'Member (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
(Node'SourceInfo'Member'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Node'SourceInfo'Member'docComment :: ((Untyped.ReadCtx m msg)) => (Node'SourceInfo'Member msg) -> (m Std_.Bool)
(Node'SourceInfo'Member'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Node'SourceInfo'Member'docComment :: ((Untyped.RWCtx m s)) => Std_.Int -> (Node'SourceInfo'Member (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
Int
len Node'SourceInfo'Member ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Node'SourceInfo'Member ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Node'SourceInfo'Member ('Mut s)
struct) Int
len)
(Node'SourceInfo'Member ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Node'SourceInfo'Member ('Mut s) -> Text ('Mut s) -> m ()
set_Node'SourceInfo'Member'docComment Node'SourceInfo'Member ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
newtype Field msg
= Field'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Field msg)) where
fromStruct :: Struct msg -> m (Field msg)
fromStruct Struct msg
struct = (Field msg -> m (Field msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Field msg
forall (msg :: Mutability). Struct msg -> Field msg
Field'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Field msg)) where
toStruct :: Field msg -> Struct msg
toStruct (Field'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Field mut) mut) where
message :: Field mut -> Message mut
message (Field'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Field mut) mut) where
messageDefault :: Message mut -> m (Field mut)
messageDefault Message mut
msg = (Struct mut -> Field mut
forall (msg :: Mutability). Struct msg -> Field msg
Field'newtype_ (Struct mut -> Field mut) -> m (Struct mut) -> m (Field mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Field msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Field msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Field msg
forall (msg :: Mutability). Struct msg -> Field msg
Field'newtype_ (Struct msg -> Field msg) -> m (Struct msg) -> m (Field msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Field (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Field ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Field'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Field (Message.Mut s))) where
new :: Message ('Mut s) -> m (Field ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Field ('Mut s)
forall (msg :: Mutability). Struct msg -> Field msg
Field'newtype_ (Struct ('Mut s) -> Field ('Mut s))
-> m (Struct ('Mut s)) -> m (Field ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
3 Word16
4))
instance (Basics.ListElem mut (Field mut)) where
newtype List mut (Field mut)
= Field'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Field mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Field mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Field mut)
Field'List_ (ListOf mut (Struct mut) -> List mut (Field mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Field mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Field mut) -> List mut
toUntypedList (Field'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Field mut) -> Int
length (Field'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Field mut) -> m (Field mut)
index Int
i (Field'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Field mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Field (Message.Mut s))) where
setIndex :: Field ('Mut s) -> Int -> List ('Mut s) (Field ('Mut s)) -> m ()
setIndex (Field'newtype_ Struct ('Mut s)
elt) Int
i (Field'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Field ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s)) -> List ('Mut s) (Field ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Field mut)
Field'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Field ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Field ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
3 Word16
4 Int
len))
get_Field'name :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Field msg) -> (m (Basics.Text msg))
get_Field'name :: Field msg -> m (Text msg)
get_Field'name (Field'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Field'name :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Field (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Field'name :: Field ('Mut s) -> Text ('Mut s) -> m ()
set_Field'name (Field'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Field'name :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Bool)
has_Field'name :: Field msg -> m Bool
has_Field'name (Field'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Field'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Field (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_Field'name :: Int -> Field ('Mut s) -> m (Text ('Mut s))
new_Field'name Int
len Field ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Field ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Field ('Mut s)
struct) Int
len)
(Field ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Field ('Mut s) -> Text ('Mut s) -> m ()
set_Field'name Field ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_Field'codeOrder :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Word16)
get_Field'codeOrder :: Field msg -> m Word16
get_Field'codeOrder (Field'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Field'codeOrder :: ((Untyped.RWCtx m s)) => (Field (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Field'codeOrder :: Field ('Mut s) -> Word16 -> m ()
set_Field'codeOrder (Field'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
get_Field'annotations :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Field msg) -> (m (Basics.List msg (Annotation msg)))
get_Field'annotations :: Field msg -> m (List msg (Annotation msg))
get_Field'annotations (Field'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Annotation msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Field'annotations :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Field (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
set_Field'annotations :: Field ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Field'annotations (Field'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Annotation ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_Field'annotations :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Bool)
has_Field'annotations :: Field msg -> m Bool
has_Field'annotations (Field'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_Field'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Field (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
new_Field'annotations :: Int -> Field ('Mut s) -> m (List ('Mut s) (Annotation ('Mut s)))
new_Field'annotations Int
len Field ('Mut s)
struct = (do
List ('Mut s) (Annotation ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Annotation ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Field ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Field ('Mut s)
struct) Int
len)
(Field ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Annotation ('Mut s)))) =>
Field ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Field'annotations Field ('Mut s)
struct List ('Mut s) (Annotation ('Mut s))
result)
(List ('Mut s) (Annotation ('Mut s))
-> m (List ('Mut s) (Annotation ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Annotation ('Mut s))
result)
)
get_Field'discriminantValue :: ((Untyped.ReadCtx m msg)) => (Field msg) -> (m Std_.Word16)
get_Field'discriminantValue :: Field msg -> m Word16
get_Field'discriminantValue (Field'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
16 Word64
65535)
set_Field'discriminantValue :: ((Untyped.RWCtx m s)) => (Field (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Field'discriminantValue :: Field ('Mut s) -> Word16 -> m ()
set_Field'discriminantValue (Field'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
16 Word64
65535)
get_Field'ordinal :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Field'ordinal msg))) => (Field msg) -> (m (Field'ordinal msg))
get_Field'ordinal :: Field msg -> m (Field'ordinal msg)
get_Field'ordinal (Field'newtype_ Struct msg
struct) = (Struct msg -> m (Field'ordinal msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
data Field' (mut :: Message.Mutability)
= Field'slot (Field'slot mut)
| Field'group (Field'group mut)
| Field'unknown' Std_.Word16
instance (Classes.FromStruct mut (Field' mut)) where
fromStruct :: Struct mut -> m (Field' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
4)
case Word16
tag of
Word16
0 ->
(Field'slot mut -> Field' mut
forall (mut :: Mutability). Field'slot mut -> Field' mut
Field'slot (Field'slot mut -> Field' mut)
-> m (Field'slot mut) -> m (Field' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Field'slot mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
1 ->
(Field'group mut -> Field' mut
forall (mut :: Mutability). Field'group mut -> Field' mut
Field'group (Field'group mut -> Field' mut)
-> m (Field'group mut) -> m (Field' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Field'group mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
_ ->
(Field' mut -> m (Field' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Field' mut
forall (mut :: Mutability). Word16 -> Field' mut
Field'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Field' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Field' msg))) => (Field msg) -> (m (Field' msg))
get_Field' :: Field msg -> m (Field' msg)
get_Field' (Field'newtype_ Struct msg
struct) = (Struct msg -> m (Field' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Field'slot :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Field'slot (Message.Mut s)))) => (Field (Message.Mut s)) -> (m (Field'slot (Message.Mut s)))
set_Field'slot :: Field ('Mut s) -> m (Field'slot ('Mut s))
set_Field'slot (Field'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
1 Int
0 Word64
0)
(Struct ('Mut s) -> m (Field'slot ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Field'group :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Field'group (Message.Mut s)))) => (Field (Message.Mut s)) -> (m (Field'group (Message.Mut s)))
set_Field'group :: Field ('Mut s) -> m (Field'group ('Mut s))
set_Field'group (Field'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
1 Int
0 Word64
0)
(Struct ('Mut s) -> m (Field'group ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Field'unknown' :: ((Untyped.RWCtx m s)) => (Field (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Field'unknown' :: Field ('Mut s) -> Word16 -> m ()
set_Field'unknown' (Field'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
0 Word64
0)
newtype Field'slot msg
= Field'slot'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Field'slot msg)) where
fromStruct :: Struct msg -> m (Field'slot msg)
fromStruct Struct msg
struct = (Field'slot msg -> m (Field'slot msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Field'slot msg
forall (msg :: Mutability). Struct msg -> Field'slot msg
Field'slot'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Field'slot msg)) where
toStruct :: Field'slot msg -> Struct msg
toStruct (Field'slot'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Field'slot mut) mut) where
message :: Field'slot mut -> Message mut
message (Field'slot'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Field'slot mut) mut) where
messageDefault :: Message mut -> m (Field'slot mut)
messageDefault Message mut
msg = (Struct mut -> Field'slot mut
forall (msg :: Mutability). Struct msg -> Field'slot msg
Field'slot'newtype_ (Struct mut -> Field'slot mut)
-> m (Struct mut) -> m (Field'slot mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Field'slot'offset :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Word32)
get_Field'slot'offset :: Field'slot msg -> m Word32
get_Field'slot'offset (Field'slot'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word32
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
32 Word64
0)
set_Field'slot'offset :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> Std_.Word32 -> (m ())
set_Field'slot'offset :: Field'slot ('Mut s) -> Word32 -> m ()
set_Field'slot'offset (Field'slot'newtype_ Struct ('Mut s)
struct) Word32
value = (Struct ('Mut s) -> Word32 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word32 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word32
value)) :: Std_.Word32) Int
0 Int
32 Word64
0)
get_Field'slot'type_ :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Type msg))) => (Field'slot msg) -> (m (Type msg))
get_Field'slot'type_ :: Field'slot msg -> m (Type msg)
get_Field'slot'type_ (Field'slot'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Type msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Field'slot'type_ :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Type (Message.Mut s)))) => (Field'slot (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
set_Field'slot'type_ :: Field'slot ('Mut s) -> Type ('Mut s) -> m ()
set_Field'slot'type_ (Field'slot'newtype_ Struct ('Mut s)
struct) Type ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Type ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Type ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
2 Struct ('Mut s)
struct)
)
has_Field'slot'type_ :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Bool)
has_Field'slot'type_ :: Field'slot msg -> m Bool
has_Field'slot'type_ (Field'slot'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct))
new_Field'slot'type_ :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> (m (Type (Message.Mut s)))
new_Field'slot'type_ :: Field'slot ('Mut s) -> m (Type ('Mut s))
new_Field'slot'type_ Field'slot ('Mut s)
struct = (do
Type ('Mut s)
result <- (Message ('Mut s) -> m (Type ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Field'slot ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Field'slot ('Mut s)
struct))
(Field'slot ('Mut s) -> Type ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Type ('Mut s))) =>
Field'slot ('Mut s) -> Type ('Mut s) -> m ()
set_Field'slot'type_ Field'slot ('Mut s)
struct Type ('Mut s)
result)
(Type ('Mut s) -> m (Type ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type ('Mut s)
result)
)
get_Field'slot'defaultValue :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Value msg))) => (Field'slot msg) -> (m (Value msg))
get_Field'slot'defaultValue :: Field'slot msg -> m (Value msg)
get_Field'slot'defaultValue (Field'slot'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Value msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Field'slot'defaultValue :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Value (Message.Mut s)))) => (Field'slot (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
set_Field'slot'defaultValue :: Field'slot ('Mut s) -> Value ('Mut s) -> m ()
set_Field'slot'defaultValue (Field'slot'newtype_ Struct ('Mut s)
struct) Value ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Value ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Value ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Field'slot'defaultValue :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Bool)
has_Field'slot'defaultValue :: Field'slot msg -> m Bool
has_Field'slot'defaultValue (Field'slot'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Field'slot'defaultValue :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> (m (Value (Message.Mut s)))
new_Field'slot'defaultValue :: Field'slot ('Mut s) -> m (Value ('Mut s))
new_Field'slot'defaultValue Field'slot ('Mut s)
struct = (do
Value ('Mut s)
result <- (Message ('Mut s) -> m (Value ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Field'slot ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Field'slot ('Mut s)
struct))
(Field'slot ('Mut s) -> Value ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Value ('Mut s))) =>
Field'slot ('Mut s) -> Value ('Mut s) -> m ()
set_Field'slot'defaultValue Field'slot ('Mut s)
struct Value ('Mut s)
result)
(Value ('Mut s) -> m (Value ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Value ('Mut s)
result)
)
get_Field'slot'hadExplicitDefault :: ((Untyped.ReadCtx m msg)) => (Field'slot msg) -> (m Std_.Bool)
get_Field'slot'hadExplicitDefault :: Field'slot msg -> m Bool
get_Field'slot'hadExplicitDefault (Field'slot'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
2 Int
0 Word64
0)
set_Field'slot'hadExplicitDefault :: ((Untyped.RWCtx m s)) => (Field'slot (Message.Mut s)) -> Std_.Bool -> (m ())
set_Field'slot'hadExplicitDefault :: Field'slot ('Mut s) -> Bool -> m ()
set_Field'slot'hadExplicitDefault (Field'slot'newtype_ Struct ('Mut s)
struct) Bool
value = (Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
2 Int
0 Word64
0)
newtype Field'group msg
= Field'group'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Field'group msg)) where
fromStruct :: Struct msg -> m (Field'group msg)
fromStruct Struct msg
struct = (Field'group msg -> m (Field'group msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Field'group msg
forall (msg :: Mutability). Struct msg -> Field'group msg
Field'group'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Field'group msg)) where
toStruct :: Field'group msg -> Struct msg
toStruct (Field'group'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Field'group mut) mut) where
message :: Field'group mut -> Message mut
message (Field'group'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Field'group mut) mut) where
messageDefault :: Message mut -> m (Field'group mut)
messageDefault Message mut
msg = (Struct mut -> Field'group mut
forall (msg :: Mutability). Struct msg -> Field'group msg
Field'group'newtype_ (Struct mut -> Field'group mut)
-> m (Struct mut) -> m (Field'group mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Field'group'typeId :: ((Untyped.ReadCtx m msg)) => (Field'group msg) -> (m Std_.Word64)
get_Field'group'typeId :: Field'group msg -> m Word64
get_Field'group'typeId (Field'group'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
2 Int
0 Word64
0)
set_Field'group'typeId :: ((Untyped.RWCtx m s)) => (Field'group (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Field'group'typeId :: Field'group ('Mut s) -> Word64 -> m ()
set_Field'group'typeId (Field'group'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
2 Int
0 Word64
0)
newtype Field'ordinal msg
= Field'ordinal'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Field'ordinal msg)) where
fromStruct :: Struct msg -> m (Field'ordinal msg)
fromStruct Struct msg
struct = (Field'ordinal msg -> m (Field'ordinal msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Field'ordinal msg
forall (msg :: Mutability). Struct msg -> Field'ordinal msg
Field'ordinal'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Field'ordinal msg)) where
toStruct :: Field'ordinal msg -> Struct msg
toStruct (Field'ordinal'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Field'ordinal mut) mut) where
message :: Field'ordinal mut -> Message mut
message (Field'ordinal'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Field'ordinal mut) mut) where
messageDefault :: Message mut -> m (Field'ordinal mut)
messageDefault Message mut
msg = (Struct mut -> Field'ordinal mut
forall (msg :: Mutability). Struct msg -> Field'ordinal msg
Field'ordinal'newtype_ (Struct mut -> Field'ordinal mut)
-> m (Struct mut) -> m (Field'ordinal mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
data Field'ordinal' (mut :: Message.Mutability)
= Field'ordinal'implicit
| Field'ordinal'explicit Std_.Word16
| Field'ordinal'unknown' Std_.Word16
instance (Classes.FromStruct mut (Field'ordinal' mut)) where
fromStruct :: Struct mut -> m (Field'ordinal' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
5)
case Word16
tag of
Word16
0 ->
(Field'ordinal' mut -> m (Field'ordinal' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Field'ordinal' mut
forall (mut :: Mutability). Field'ordinal' mut
Field'ordinal'implicit)
Word16
1 ->
(Word16 -> Field'ordinal' mut
forall (mut :: Mutability). Word16 -> Field'ordinal' mut
Field'ordinal'explicit (Word16 -> Field'ordinal' mut)
-> m Word16 -> m (Field'ordinal' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
1 Int
32 Word64
0))
Word16
_ ->
(Field'ordinal' mut -> m (Field'ordinal' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Field'ordinal' mut
forall (mut :: Mutability). Word16 -> Field'ordinal' mut
Field'ordinal'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Field'ordinal' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Field'ordinal' msg))) => (Field'ordinal msg) -> (m (Field'ordinal' msg))
get_Field'ordinal' :: Field'ordinal msg -> m (Field'ordinal' msg)
get_Field'ordinal' (Field'ordinal'newtype_ Struct msg
struct) = (Struct msg -> m (Field'ordinal' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Field'ordinal'implicit :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.Mut s)) -> (m ())
set_Field'ordinal'implicit :: Field'ordinal ('Mut s) -> m ()
set_Field'ordinal'implicit (Field'ordinal'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
1 Int
16 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Field'ordinal'explicit :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Field'ordinal'explicit :: Field'ordinal ('Mut s) -> Word16 -> m ()
set_Field'ordinal'explicit (Field'ordinal'newtype_ Struct ('Mut s)
struct) Word16
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
1 Int
16 Word64
0)
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
32 Word64
0)
)
set_Field'ordinal'unknown' :: ((Untyped.RWCtx m s)) => (Field'ordinal (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Field'ordinal'unknown' :: Field'ordinal ('Mut s) -> Word16 -> m ()
set_Field'ordinal'unknown' (Field'ordinal'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
16 Word64
0)
field'noDiscriminant :: Std_.Word16
field'noDiscriminant :: Word16
field'noDiscriminant = (Word64 -> Word16
forall a. IsWord a => Word64 -> a
Classes.fromWord Word64
65535)
newtype Enumerant msg
= Enumerant'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Enumerant msg)) where
fromStruct :: Struct msg -> m (Enumerant msg)
fromStruct Struct msg
struct = (Enumerant msg -> m (Enumerant msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Enumerant msg
forall (msg :: Mutability). Struct msg -> Enumerant msg
Enumerant'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Enumerant msg)) where
toStruct :: Enumerant msg -> Struct msg
toStruct (Enumerant'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Enumerant mut) mut) where
message :: Enumerant mut -> Message mut
message (Enumerant'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Enumerant mut) mut) where
messageDefault :: Message mut -> m (Enumerant mut)
messageDefault Message mut
msg = (Struct mut -> Enumerant mut
forall (msg :: Mutability). Struct msg -> Enumerant msg
Enumerant'newtype_ (Struct mut -> Enumerant mut)
-> m (Struct mut) -> m (Enumerant mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Enumerant msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Enumerant msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Enumerant msg
forall (msg :: Mutability). Struct msg -> Enumerant msg
Enumerant'newtype_ (Struct msg -> Enumerant msg)
-> m (Struct msg) -> m (Enumerant msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Enumerant (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Enumerant ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Enumerant'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Enumerant (Message.Mut s))) where
new :: Message ('Mut s) -> m (Enumerant ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Enumerant ('Mut s)
forall (msg :: Mutability). Struct msg -> Enumerant msg
Enumerant'newtype_ (Struct ('Mut s) -> Enumerant ('Mut s))
-> m (Struct ('Mut s)) -> m (Enumerant ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
2))
instance (Basics.ListElem mut (Enumerant mut)) where
newtype List mut (Enumerant mut)
= Enumerant'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Enumerant mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Enumerant mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Enumerant mut)
Enumerant'List_ (ListOf mut (Struct mut) -> List mut (Enumerant mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Enumerant mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Enumerant mut) -> List mut
toUntypedList (Enumerant'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Enumerant mut) -> Int
length (Enumerant'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Enumerant mut) -> m (Enumerant mut)
index Int
i (Enumerant'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Enumerant mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Enumerant (Message.Mut s))) where
setIndex :: Enumerant ('Mut s)
-> Int -> List ('Mut s) (Enumerant ('Mut s)) -> m ()
setIndex (Enumerant'newtype_ Struct ('Mut s)
elt) Int
i (Enumerant'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Enumerant ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Enumerant ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Enumerant mut)
Enumerant'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Enumerant ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Enumerant ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
2 Int
len))
get_Enumerant'name :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Enumerant msg) -> (m (Basics.Text msg))
get_Enumerant'name :: Enumerant msg -> m (Text msg)
get_Enumerant'name (Enumerant'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Enumerant'name :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Enumerant (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Enumerant'name :: Enumerant ('Mut s) -> Text ('Mut s) -> m ()
set_Enumerant'name (Enumerant'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Enumerant'name :: ((Untyped.ReadCtx m msg)) => (Enumerant msg) -> (m Std_.Bool)
has_Enumerant'name :: Enumerant msg -> m Bool
has_Enumerant'name (Enumerant'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Enumerant'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Enumerant (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_Enumerant'name :: Int -> Enumerant ('Mut s) -> m (Text ('Mut s))
new_Enumerant'name Int
len Enumerant ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Enumerant ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Enumerant ('Mut s)
struct) Int
len)
(Enumerant ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Enumerant ('Mut s) -> Text ('Mut s) -> m ()
set_Enumerant'name Enumerant ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_Enumerant'codeOrder :: ((Untyped.ReadCtx m msg)) => (Enumerant msg) -> (m Std_.Word16)
get_Enumerant'codeOrder :: Enumerant msg -> m Word16
get_Enumerant'codeOrder (Enumerant'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Enumerant'codeOrder :: ((Untyped.RWCtx m s)) => (Enumerant (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Enumerant'codeOrder :: Enumerant ('Mut s) -> Word16 -> m ()
set_Enumerant'codeOrder (Enumerant'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
get_Enumerant'annotations :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Enumerant msg) -> (m (Basics.List msg (Annotation msg)))
get_Enumerant'annotations :: Enumerant msg -> m (List msg (Annotation msg))
get_Enumerant'annotations (Enumerant'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Annotation msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Enumerant'annotations :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Enumerant (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
set_Enumerant'annotations :: Enumerant ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Enumerant'annotations (Enumerant'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Annotation ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_Enumerant'annotations :: ((Untyped.ReadCtx m msg)) => (Enumerant msg) -> (m Std_.Bool)
has_Enumerant'annotations :: Enumerant msg -> m Bool
has_Enumerant'annotations (Enumerant'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_Enumerant'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Enumerant (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
new_Enumerant'annotations :: Int
-> Enumerant ('Mut s) -> m (List ('Mut s) (Annotation ('Mut s)))
new_Enumerant'annotations Int
len Enumerant ('Mut s)
struct = (do
List ('Mut s) (Annotation ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Annotation ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Enumerant ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Enumerant ('Mut s)
struct) Int
len)
(Enumerant ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Annotation ('Mut s)))) =>
Enumerant ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Enumerant'annotations Enumerant ('Mut s)
struct List ('Mut s) (Annotation ('Mut s))
result)
(List ('Mut s) (Annotation ('Mut s))
-> m (List ('Mut s) (Annotation ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Annotation ('Mut s))
result)
)
newtype Superclass msg
= Superclass'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Superclass msg)) where
fromStruct :: Struct msg -> m (Superclass msg)
fromStruct Struct msg
struct = (Superclass msg -> m (Superclass msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Superclass msg
forall (msg :: Mutability). Struct msg -> Superclass msg
Superclass'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Superclass msg)) where
toStruct :: Superclass msg -> Struct msg
toStruct (Superclass'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Superclass mut) mut) where
message :: Superclass mut -> Message mut
message (Superclass'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Superclass mut) mut) where
messageDefault :: Message mut -> m (Superclass mut)
messageDefault Message mut
msg = (Struct mut -> Superclass mut
forall (msg :: Mutability). Struct msg -> Superclass msg
Superclass'newtype_ (Struct mut -> Superclass mut)
-> m (Struct mut) -> m (Superclass mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Superclass msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Superclass msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Superclass msg
forall (msg :: Mutability). Struct msg -> Superclass msg
Superclass'newtype_ (Struct msg -> Superclass msg)
-> m (Struct msg) -> m (Superclass msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Superclass (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Superclass ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Superclass'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Superclass (Message.Mut s))) where
new :: Message ('Mut s) -> m (Superclass ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Superclass ('Mut s)
forall (msg :: Mutability). Struct msg -> Superclass msg
Superclass'newtype_ (Struct ('Mut s) -> Superclass ('Mut s))
-> m (Struct ('Mut s)) -> m (Superclass ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
1))
instance (Basics.ListElem mut (Superclass mut)) where
newtype List mut (Superclass mut)
= Superclass'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Superclass mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Superclass mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Superclass mut)
Superclass'List_ (ListOf mut (Struct mut) -> List mut (Superclass mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Superclass mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Superclass mut) -> List mut
toUntypedList (Superclass'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Superclass mut) -> Int
length (Superclass'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Superclass mut) -> m (Superclass mut)
index Int
i (Superclass'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Superclass mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Superclass (Message.Mut s))) where
setIndex :: Superclass ('Mut s)
-> Int -> List ('Mut s) (Superclass ('Mut s)) -> m ()
setIndex (Superclass'newtype_ Struct ('Mut s)
elt) Int
i (Superclass'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Superclass ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Superclass ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Superclass mut)
Superclass'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Superclass ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Superclass ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
1 Int
len))
get_Superclass'id :: ((Untyped.ReadCtx m msg)) => (Superclass msg) -> (m Std_.Word64)
get_Superclass'id :: Superclass msg -> m Word64
get_Superclass'id (Superclass'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Superclass'id :: ((Untyped.RWCtx m s)) => (Superclass (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Superclass'id :: Superclass ('Mut s) -> Word64 -> m ()
set_Superclass'id (Superclass'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
get_Superclass'brand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Superclass msg) -> (m (Brand msg))
get_Superclass'brand :: Superclass msg -> m (Brand msg)
get_Superclass'brand (Superclass'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Superclass'brand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Superclass (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Superclass'brand :: Superclass ('Mut s) -> Brand ('Mut s) -> m ()
set_Superclass'brand (Superclass'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Superclass'brand :: ((Untyped.ReadCtx m msg)) => (Superclass msg) -> (m Std_.Bool)
has_Superclass'brand :: Superclass msg -> m Bool
has_Superclass'brand (Superclass'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Superclass'brand :: ((Untyped.RWCtx m s)) => (Superclass (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Superclass'brand :: Superclass ('Mut s) -> m (Brand ('Mut s))
new_Superclass'brand Superclass ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Superclass ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Superclass ('Mut s)
struct))
(Superclass ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Superclass ('Mut s) -> Brand ('Mut s) -> m ()
set_Superclass'brand Superclass ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
newtype Method msg
= Method'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Method msg)) where
fromStruct :: Struct msg -> m (Method msg)
fromStruct Struct msg
struct = (Method msg -> m (Method msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Method msg
forall (msg :: Mutability). Struct msg -> Method msg
Method'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Method msg)) where
toStruct :: Method msg -> Struct msg
toStruct (Method'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Method mut) mut) where
message :: Method mut -> Message mut
message (Method'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Method mut) mut) where
messageDefault :: Message mut -> m (Method mut)
messageDefault Message mut
msg = (Struct mut -> Method mut
forall (msg :: Mutability). Struct msg -> Method msg
Method'newtype_ (Struct mut -> Method mut) -> m (Struct mut) -> m (Method mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Method msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Method msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Method msg
forall (msg :: Mutability). Struct msg -> Method msg
Method'newtype_ (Struct msg -> Method msg) -> m (Struct msg) -> m (Method msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Method (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Method ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Method'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Method (Message.Mut s))) where
new :: Message ('Mut s) -> m (Method ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Method ('Mut s)
forall (msg :: Mutability). Struct msg -> Method msg
Method'newtype_ (Struct ('Mut s) -> Method ('Mut s))
-> m (Struct ('Mut s)) -> m (Method ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
3 Word16
5))
instance (Basics.ListElem mut (Method mut)) where
newtype List mut (Method mut)
= Method'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Method mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Method mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Method mut)
Method'List_ (ListOf mut (Struct mut) -> List mut (Method mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Method mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Method mut) -> List mut
toUntypedList (Method'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Method mut) -> Int
length (Method'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Method mut) -> m (Method mut)
index Int
i (Method'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Method mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Method (Message.Mut s))) where
setIndex :: Method ('Mut s) -> Int -> List ('Mut s) (Method ('Mut s)) -> m ()
setIndex (Method'newtype_ Struct ('Mut s)
elt) Int
i (Method'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Method ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Method ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Method mut)
Method'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Method ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Method ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
3 Word16
5 Int
len))
get_Method'name :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (Method msg) -> (m (Basics.Text msg))
get_Method'name :: Method msg -> m (Text msg)
get_Method'name (Method'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Method'name :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Method (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Method'name :: Method ('Mut s) -> Text ('Mut s) -> m ()
set_Method'name (Method'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Method'name :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
has_Method'name :: Method msg -> m Bool
has_Method'name (Method'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Method'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_Method'name :: Int -> Method ('Mut s) -> m (Text ('Mut s))
new_Method'name Int
len Method ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (Method ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Method ('Mut s)
struct) Int
len)
(Method ('Mut s) -> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
Method ('Mut s) -> Text ('Mut s) -> m ()
set_Method'name Method ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_Method'codeOrder :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Word16)
get_Method'codeOrder :: Method msg -> m Word16
get_Method'codeOrder (Method'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Method'codeOrder :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Method'codeOrder :: Method ('Mut s) -> Word16 -> m ()
set_Method'codeOrder (Method'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
get_Method'paramStructType :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Word64)
get_Method'paramStructType :: Method msg -> m Word64
get_Method'paramStructType (Method'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
0 Word64
0)
set_Method'paramStructType :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Method'paramStructType :: Method ('Mut s) -> Word64 -> m ()
set_Method'paramStructType (Method'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
get_Method'resultStructType :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Word64)
get_Method'resultStructType :: Method msg -> m Word64
get_Method'resultStructType (Method'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
2 Int
0 Word64
0)
set_Method'resultStructType :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Method'resultStructType :: Method ('Mut s) -> Word64 -> m ()
set_Method'resultStructType (Method'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
2 Int
0 Word64
0)
get_Method'annotations :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Annotation msg)))) => (Method msg) -> (m (Basics.List msg (Annotation msg)))
get_Method'annotations :: Method msg -> m (List msg (Annotation msg))
get_Method'annotations (Method'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Annotation msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Method'annotations :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))) => (Method (Message.Mut s)) -> (Basics.List (Message.Mut s) (Annotation (Message.Mut s))) -> (m ())
set_Method'annotations :: Method ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Method'annotations (Method'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Annotation ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Annotation ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_Method'annotations :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
has_Method'annotations :: Method msg -> m Bool
has_Method'annotations (Method'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_Method'annotations :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Annotation (Message.Mut s))))
new_Method'annotations :: Int -> Method ('Mut s) -> m (List ('Mut s) (Annotation ('Mut s)))
new_Method'annotations Int
len Method ('Mut s)
struct = (do
List ('Mut s) (Annotation ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Annotation ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Method ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Method ('Mut s)
struct) Int
len)
(Method ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Annotation ('Mut s)))) =>
Method ('Mut s) -> List ('Mut s) (Annotation ('Mut s)) -> m ()
set_Method'annotations Method ('Mut s)
struct List ('Mut s) (Annotation ('Mut s))
result)
(List ('Mut s) (Annotation ('Mut s))
-> m (List ('Mut s) (Annotation ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Annotation ('Mut s))
result)
)
get_Method'paramBrand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Method msg) -> (m (Brand msg))
get_Method'paramBrand :: Method msg -> m (Brand msg)
get_Method'paramBrand (Method'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Method'paramBrand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Method (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Method'paramBrand :: Method ('Mut s) -> Brand ('Mut s) -> m ()
set_Method'paramBrand (Method'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
2 Struct ('Mut s)
struct)
)
has_Method'paramBrand :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
has_Method'paramBrand :: Method msg -> m Bool
has_Method'paramBrand (Method'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct))
new_Method'paramBrand :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Method'paramBrand :: Method ('Mut s) -> m (Brand ('Mut s))
new_Method'paramBrand Method ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Method ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Method ('Mut s)
struct))
(Method ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Method ('Mut s) -> Brand ('Mut s) -> m ()
set_Method'paramBrand Method ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
get_Method'resultBrand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Method msg) -> (m (Brand msg))
get_Method'resultBrand :: Method msg -> m (Brand msg)
get_Method'resultBrand (Method'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Method'resultBrand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Method (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Method'resultBrand :: Method ('Mut s) -> Brand ('Mut s) -> m ()
set_Method'resultBrand (Method'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_Method'resultBrand :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
has_Method'resultBrand :: Method msg -> m Bool
has_Method'resultBrand (Method'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_Method'resultBrand :: ((Untyped.RWCtx m s)) => (Method (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Method'resultBrand :: Method ('Mut s) -> m (Brand ('Mut s))
new_Method'resultBrand Method ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Method ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Method ('Mut s)
struct))
(Method ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Method ('Mut s) -> Brand ('Mut s) -> m ()
set_Method'resultBrand Method ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
get_Method'implicitParameters :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Node'Parameter msg)))) => (Method msg) -> (m (Basics.List msg (Node'Parameter msg)))
get_Method'implicitParameters :: Method msg -> m (List msg (Node'Parameter msg))
get_Method'implicitParameters (Method'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
4 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Node'Parameter msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Method'implicitParameters :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))) => (Method (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))) -> (m ())
set_Method'implicitParameters :: Method ('Mut s) -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
set_Method'implicitParameters (Method'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Node'Parameter ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Node'Parameter ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Node'Parameter ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
4 Struct ('Mut s)
struct)
)
has_Method'implicitParameters :: ((Untyped.ReadCtx m msg)) => (Method msg) -> (m Std_.Bool)
has_Method'implicitParameters :: Method msg -> m Bool
has_Method'implicitParameters (Method'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
4 Struct msg
struct))
new_Method'implicitParameters :: ((Untyped.RWCtx m s)) => Std_.Int -> (Method (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'Parameter (Message.Mut s))))
new_Method'implicitParameters :: Int
-> Method ('Mut s) -> m (List ('Mut s) (Node'Parameter ('Mut s)))
new_Method'implicitParameters Int
len Method ('Mut s)
struct = (do
List ('Mut s) (Node'Parameter ('Mut s))
result <- (Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'Parameter ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Method ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Method ('Mut s)
struct) Int
len)
(Method ('Mut s) -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Node'Parameter ('Mut s)))) =>
Method ('Mut s) -> List ('Mut s) (Node'Parameter ('Mut s)) -> m ()
set_Method'implicitParameters Method ('Mut s)
struct List ('Mut s) (Node'Parameter ('Mut s))
result)
(List ('Mut s) (Node'Parameter ('Mut s))
-> m (List ('Mut s) (Node'Parameter ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Node'Parameter ('Mut s))
result)
)
newtype Type msg
= Type'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type msg)) where
fromStruct :: Struct msg -> m (Type msg)
fromStruct Struct msg
struct = (Type msg -> m (Type msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type msg
forall (msg :: Mutability). Struct msg -> Type msg
Type'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type msg)) where
toStruct :: Type msg -> Struct msg
toStruct (Type'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type mut) mut) where
message :: Type mut -> Message mut
message (Type'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type mut) mut) where
messageDefault :: Message mut -> m (Type mut)
messageDefault Message mut
msg = (Struct mut -> Type mut
forall (msg :: Mutability). Struct msg -> Type msg
Type'newtype_ (Struct mut -> Type mut) -> m (Struct mut) -> m (Type mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Type msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Type msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Type msg
forall (msg :: Mutability). Struct msg -> Type msg
Type'newtype_ (Struct msg -> Type msg) -> m (Struct msg) -> m (Type msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Type (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Type ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Type'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Type (Message.Mut s))) where
new :: Message ('Mut s) -> m (Type ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Type ('Mut s)
forall (msg :: Mutability). Struct msg -> Type msg
Type'newtype_ (Struct ('Mut s) -> Type ('Mut s))
-> m (Struct ('Mut s)) -> m (Type ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
3 Word16
1))
instance (Basics.ListElem mut (Type mut)) where
newtype List mut (Type mut)
= Type'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Type mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Type mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Type mut)
Type'List_ (ListOf mut (Struct mut) -> List mut (Type mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Type mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Type mut) -> List mut
toUntypedList (Type'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Type mut) -> Int
length (Type'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Type mut) -> m (Type mut)
index Int
i (Type'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Type mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Type (Message.Mut s))) where
setIndex :: Type ('Mut s) -> Int -> List ('Mut s) (Type ('Mut s)) -> m ()
setIndex (Type'newtype_ Struct ('Mut s)
elt) Int
i (Type'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Type ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s)) -> List ('Mut s) (Type ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Type mut)
Type'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Type ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Type ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
3 Word16
1 Int
len))
data Type' (mut :: Message.Mutability)
= Type'void
| Type'bool
| Type'int8
| Type'int16
| Type'int32
| Type'int64
| Type'uint8
| Type'uint16
| Type'uint32
| Type'uint64
| Type'float32
| Type'float64
| Type'text
| Type'data_
| Type'list (Type'list mut)
| Type'enum (Type'enum mut)
| Type'struct (Type'struct mut)
| Type'interface (Type'interface mut)
| Type'anyPointer (Type'anyPointer mut)
| Type'unknown' Std_.Word16
instance (Classes.FromStruct mut (Type' mut)) where
fromStruct :: Struct mut -> m (Type' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
0)
case Word16
tag of
Word16
0 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'void)
Word16
1 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'bool)
Word16
2 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'int8)
Word16
3 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'int16)
Word16
4 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'int32)
Word16
5 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'int64)
Word16
6 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'uint8)
Word16
7 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'uint16)
Word16
8 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'uint32)
Word16
9 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'uint64)
Word16
10 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'float32)
Word16
11 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'float64)
Word16
12 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'text)
Word16
13 ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type' mut
forall (mut :: Mutability). Type' mut
Type'data_)
Word16
14 ->
(Type'list mut -> Type' mut
forall (mut :: Mutability). Type'list mut -> Type' mut
Type'list (Type'list mut -> Type' mut) -> m (Type'list mut) -> m (Type' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'list mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
15 ->
(Type'enum mut -> Type' mut
forall (mut :: Mutability). Type'enum mut -> Type' mut
Type'enum (Type'enum mut -> Type' mut) -> m (Type'enum mut) -> m (Type' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'enum mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
16 ->
(Type'struct mut -> Type' mut
forall (mut :: Mutability). Type'struct mut -> Type' mut
Type'struct (Type'struct mut -> Type' mut)
-> m (Type'struct mut) -> m (Type' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'struct mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
17 ->
(Type'interface mut -> Type' mut
forall (mut :: Mutability). Type'interface mut -> Type' mut
Type'interface (Type'interface mut -> Type' mut)
-> m (Type'interface mut) -> m (Type' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'interface mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
18 ->
(Type'anyPointer mut -> Type' mut
forall (mut :: Mutability). Type'anyPointer mut -> Type' mut
Type'anyPointer (Type'anyPointer mut -> Type' mut)
-> m (Type'anyPointer mut) -> m (Type' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'anyPointer mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
_ ->
(Type' mut -> m (Type' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Type' mut
forall (mut :: Mutability). Word16 -> Type' mut
Type'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Type' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Type' msg))) => (Type msg) -> (m (Type' msg))
get_Type' :: Type msg -> m (Type' msg)
get_Type' (Type'newtype_ Struct msg
struct) = (Struct msg -> m (Type' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Type'void :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'void :: Type ('Mut s) -> m ()
set_Type'void (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'bool :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'bool :: Type ('Mut s) -> m ()
set_Type'bool (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'int8 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'int8 :: Type ('Mut s) -> m ()
set_Type'int8 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
2 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'int16 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'int16 :: Type ('Mut s) -> m ()
set_Type'int16 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
3 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'int32 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'int32 :: Type ('Mut s) -> m ()
set_Type'int32 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
4 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'int64 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'int64 :: Type ('Mut s) -> m ()
set_Type'int64 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
5 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'uint8 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'uint8 :: Type ('Mut s) -> m ()
set_Type'uint8 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
6 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'uint16 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'uint16 :: Type ('Mut s) -> m ()
set_Type'uint16 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
7 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'uint32 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'uint32 :: Type ('Mut s) -> m ()
set_Type'uint32 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
8 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'uint64 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'uint64 :: Type ('Mut s) -> m ()
set_Type'uint64 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
9 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'float32 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'float32 :: Type ('Mut s) -> m ()
set_Type'float32 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
10 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'float64 :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'float64 :: Type ('Mut s) -> m ()
set_Type'float64 (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
11 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'text :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'text :: Type ('Mut s) -> m ()
set_Type'text (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
12 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'data_ :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> (m ())
set_Type'data_ :: Type ('Mut s) -> m ()
set_Type'data_ (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
13 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'list :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'list (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'list (Message.Mut s)))
set_Type'list :: Type ('Mut s) -> m (Type'list ('Mut s))
set_Type'list (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
14 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'list ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'enum :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'enum (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'enum (Message.Mut s)))
set_Type'enum :: Type ('Mut s) -> m (Type'enum ('Mut s))
set_Type'enum (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
15 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'enum ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'struct :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'struct (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'struct (Message.Mut s)))
set_Type'struct :: Type ('Mut s) -> m (Type'struct ('Mut s))
set_Type'struct (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
16 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'struct ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'interface :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'interface (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'interface (Message.Mut s)))
set_Type'interface :: Type ('Mut s) -> m (Type'interface ('Mut s))
set_Type'interface (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
17 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'interface ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'anyPointer :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'anyPointer (Message.Mut s)))) => (Type (Message.Mut s)) -> (m (Type'anyPointer (Message.Mut s)))
set_Type'anyPointer :: Type ('Mut s) -> m (Type'anyPointer ('Mut s))
set_Type'anyPointer (Type'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
18 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'anyPointer ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'unknown' :: ((Untyped.RWCtx m s)) => (Type (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Type'unknown' :: Type ('Mut s) -> Word16 -> m ()
set_Type'unknown' (Type'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
newtype Type'list msg
= Type'list'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'list msg)) where
fromStruct :: Struct msg -> m (Type'list msg)
fromStruct Struct msg
struct = (Type'list msg -> m (Type'list msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'list msg
forall (msg :: Mutability). Struct msg -> Type'list msg
Type'list'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'list msg)) where
toStruct :: Type'list msg -> Struct msg
toStruct (Type'list'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'list mut) mut) where
message :: Type'list mut -> Message mut
message (Type'list'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'list mut) mut) where
messageDefault :: Message mut -> m (Type'list mut)
messageDefault Message mut
msg = (Struct mut -> Type'list mut
forall (msg :: Mutability). Struct msg -> Type'list msg
Type'list'newtype_ (Struct mut -> Type'list mut)
-> m (Struct mut) -> m (Type'list mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Type'list'elementType :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Type msg))) => (Type'list msg) -> (m (Type msg))
get_Type'list'elementType :: Type'list msg -> m (Type msg)
get_Type'list'elementType (Type'list'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Type msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Type'list'elementType :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Type (Message.Mut s)))) => (Type'list (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
set_Type'list'elementType :: Type'list ('Mut s) -> Type ('Mut s) -> m ()
set_Type'list'elementType (Type'list'newtype_ Struct ('Mut s)
struct) Type ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Type ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Type ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Type'list'elementType :: ((Untyped.ReadCtx m msg)) => (Type'list msg) -> (m Std_.Bool)
has_Type'list'elementType :: Type'list msg -> m Bool
has_Type'list'elementType (Type'list'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Type'list'elementType :: ((Untyped.RWCtx m s)) => (Type'list (Message.Mut s)) -> (m (Type (Message.Mut s)))
new_Type'list'elementType :: Type'list ('Mut s) -> m (Type ('Mut s))
new_Type'list'elementType Type'list ('Mut s)
struct = (do
Type ('Mut s)
result <- (Message ('Mut s) -> m (Type ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Type'list ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Type'list ('Mut s)
struct))
(Type'list ('Mut s) -> Type ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Type ('Mut s))) =>
Type'list ('Mut s) -> Type ('Mut s) -> m ()
set_Type'list'elementType Type'list ('Mut s)
struct Type ('Mut s)
result)
(Type ('Mut s) -> m (Type ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type ('Mut s)
result)
)
newtype Type'enum msg
= Type'enum'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'enum msg)) where
fromStruct :: Struct msg -> m (Type'enum msg)
fromStruct Struct msg
struct = (Type'enum msg -> m (Type'enum msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'enum msg
forall (msg :: Mutability). Struct msg -> Type'enum msg
Type'enum'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'enum msg)) where
toStruct :: Type'enum msg -> Struct msg
toStruct (Type'enum'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'enum mut) mut) where
message :: Type'enum mut -> Message mut
message (Type'enum'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'enum mut) mut) where
messageDefault :: Message mut -> m (Type'enum mut)
messageDefault Message mut
msg = (Struct mut -> Type'enum mut
forall (msg :: Mutability). Struct msg -> Type'enum msg
Type'enum'newtype_ (Struct mut -> Type'enum mut)
-> m (Struct mut) -> m (Type'enum mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Type'enum'typeId :: ((Untyped.ReadCtx m msg)) => (Type'enum msg) -> (m Std_.Word64)
get_Type'enum'typeId :: Type'enum msg -> m Word64
get_Type'enum'typeId (Type'enum'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
0 Word64
0)
set_Type'enum'typeId :: ((Untyped.RWCtx m s)) => (Type'enum (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Type'enum'typeId :: Type'enum ('Mut s) -> Word64 -> m ()
set_Type'enum'typeId (Type'enum'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
get_Type'enum'brand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Type'enum msg) -> (m (Brand msg))
get_Type'enum'brand :: Type'enum msg -> m (Brand msg)
get_Type'enum'brand (Type'enum'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Type'enum'brand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Type'enum (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Type'enum'brand :: Type'enum ('Mut s) -> Brand ('Mut s) -> m ()
set_Type'enum'brand (Type'enum'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Type'enum'brand :: ((Untyped.ReadCtx m msg)) => (Type'enum msg) -> (m Std_.Bool)
has_Type'enum'brand :: Type'enum msg -> m Bool
has_Type'enum'brand (Type'enum'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Type'enum'brand :: ((Untyped.RWCtx m s)) => (Type'enum (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Type'enum'brand :: Type'enum ('Mut s) -> m (Brand ('Mut s))
new_Type'enum'brand Type'enum ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Type'enum ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Type'enum ('Mut s)
struct))
(Type'enum ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Type'enum ('Mut s) -> Brand ('Mut s) -> m ()
set_Type'enum'brand Type'enum ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
newtype Type'struct msg
= Type'struct'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'struct msg)) where
fromStruct :: Struct msg -> m (Type'struct msg)
fromStruct Struct msg
struct = (Type'struct msg -> m (Type'struct msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'struct msg
forall (msg :: Mutability). Struct msg -> Type'struct msg
Type'struct'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'struct msg)) where
toStruct :: Type'struct msg -> Struct msg
toStruct (Type'struct'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'struct mut) mut) where
message :: Type'struct mut -> Message mut
message (Type'struct'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'struct mut) mut) where
messageDefault :: Message mut -> m (Type'struct mut)
messageDefault Message mut
msg = (Struct mut -> Type'struct mut
forall (msg :: Mutability). Struct msg -> Type'struct msg
Type'struct'newtype_ (Struct mut -> Type'struct mut)
-> m (Struct mut) -> m (Type'struct mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Type'struct'typeId :: ((Untyped.ReadCtx m msg)) => (Type'struct msg) -> (m Std_.Word64)
get_Type'struct'typeId :: Type'struct msg -> m Word64
get_Type'struct'typeId (Type'struct'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
0 Word64
0)
set_Type'struct'typeId :: ((Untyped.RWCtx m s)) => (Type'struct (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Type'struct'typeId :: Type'struct ('Mut s) -> Word64 -> m ()
set_Type'struct'typeId (Type'struct'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
get_Type'struct'brand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Type'struct msg) -> (m (Brand msg))
get_Type'struct'brand :: Type'struct msg -> m (Brand msg)
get_Type'struct'brand (Type'struct'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Type'struct'brand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Type'struct (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Type'struct'brand :: Type'struct ('Mut s) -> Brand ('Mut s) -> m ()
set_Type'struct'brand (Type'struct'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Type'struct'brand :: ((Untyped.ReadCtx m msg)) => (Type'struct msg) -> (m Std_.Bool)
has_Type'struct'brand :: Type'struct msg -> m Bool
has_Type'struct'brand (Type'struct'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Type'struct'brand :: ((Untyped.RWCtx m s)) => (Type'struct (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Type'struct'brand :: Type'struct ('Mut s) -> m (Brand ('Mut s))
new_Type'struct'brand Type'struct ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Type'struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Type'struct ('Mut s)
struct))
(Type'struct ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Type'struct ('Mut s) -> Brand ('Mut s) -> m ()
set_Type'struct'brand Type'struct ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
newtype Type'interface msg
= Type'interface'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'interface msg)) where
fromStruct :: Struct msg -> m (Type'interface msg)
fromStruct Struct msg
struct = (Type'interface msg -> m (Type'interface msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'interface msg
forall (msg :: Mutability). Struct msg -> Type'interface msg
Type'interface'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'interface msg)) where
toStruct :: Type'interface msg -> Struct msg
toStruct (Type'interface'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'interface mut) mut) where
message :: Type'interface mut -> Message mut
message (Type'interface'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'interface mut) mut) where
messageDefault :: Message mut -> m (Type'interface mut)
messageDefault Message mut
msg = (Struct mut -> Type'interface mut
forall (msg :: Mutability). Struct msg -> Type'interface msg
Type'interface'newtype_ (Struct mut -> Type'interface mut)
-> m (Struct mut) -> m (Type'interface mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Type'interface'typeId :: ((Untyped.ReadCtx m msg)) => (Type'interface msg) -> (m Std_.Word64)
get_Type'interface'typeId :: Type'interface msg -> m Word64
get_Type'interface'typeId (Type'interface'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
0 Word64
0)
set_Type'interface'typeId :: ((Untyped.RWCtx m s)) => (Type'interface (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Type'interface'typeId :: Type'interface ('Mut s) -> Word64 -> m ()
set_Type'interface'typeId (Type'interface'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
get_Type'interface'brand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Type'interface msg) -> (m (Brand msg))
get_Type'interface'brand :: Type'interface msg -> m (Brand msg)
get_Type'interface'brand (Type'interface'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Type'interface'brand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Type'interface (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Type'interface'brand :: Type'interface ('Mut s) -> Brand ('Mut s) -> m ()
set_Type'interface'brand (Type'interface'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Type'interface'brand :: ((Untyped.ReadCtx m msg)) => (Type'interface msg) -> (m Std_.Bool)
has_Type'interface'brand :: Type'interface msg -> m Bool
has_Type'interface'brand (Type'interface'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Type'interface'brand :: ((Untyped.RWCtx m s)) => (Type'interface (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Type'interface'brand :: Type'interface ('Mut s) -> m (Brand ('Mut s))
new_Type'interface'brand Type'interface ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Type'interface ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Type'interface ('Mut s)
struct))
(Type'interface ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Type'interface ('Mut s) -> Brand ('Mut s) -> m ()
set_Type'interface'brand Type'interface ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
newtype Type'anyPointer msg
= Type'anyPointer'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'anyPointer msg)) where
fromStruct :: Struct msg -> m (Type'anyPointer msg)
fromStruct Struct msg
struct = (Type'anyPointer msg -> m (Type'anyPointer msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'anyPointer msg
forall (msg :: Mutability). Struct msg -> Type'anyPointer msg
Type'anyPointer'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'anyPointer msg)) where
toStruct :: Type'anyPointer msg -> Struct msg
toStruct (Type'anyPointer'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'anyPointer mut) mut) where
message :: Type'anyPointer mut -> Message mut
message (Type'anyPointer'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'anyPointer mut) mut) where
messageDefault :: Message mut -> m (Type'anyPointer mut)
messageDefault Message mut
msg = (Struct mut -> Type'anyPointer mut
forall (msg :: Mutability). Struct msg -> Type'anyPointer msg
Type'anyPointer'newtype_ (Struct mut -> Type'anyPointer mut)
-> m (Struct mut) -> m (Type'anyPointer mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
data Type'anyPointer' (mut :: Message.Mutability)
= Type'anyPointer'unconstrained (Type'anyPointer'unconstrained mut)
| Type'anyPointer'parameter (Type'anyPointer'parameter mut)
| Type'anyPointer'implicitMethodParameter (Type'anyPointer'implicitMethodParameter mut)
| Type'anyPointer'unknown' Std_.Word16
instance (Classes.FromStruct mut (Type'anyPointer' mut)) where
fromStruct :: Struct mut -> m (Type'anyPointer' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
4)
case Word16
tag of
Word16
0 ->
(Type'anyPointer'unconstrained mut -> Type'anyPointer' mut
forall (mut :: Mutability).
Type'anyPointer'unconstrained mut -> Type'anyPointer' mut
Type'anyPointer'unconstrained (Type'anyPointer'unconstrained mut -> Type'anyPointer' mut)
-> m (Type'anyPointer'unconstrained mut)
-> m (Type'anyPointer' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'anyPointer'unconstrained mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
1 ->
(Type'anyPointer'parameter mut -> Type'anyPointer' mut
forall (mut :: Mutability).
Type'anyPointer'parameter mut -> Type'anyPointer' mut
Type'anyPointer'parameter (Type'anyPointer'parameter mut -> Type'anyPointer' mut)
-> m (Type'anyPointer'parameter mut) -> m (Type'anyPointer' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'anyPointer'parameter mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
2 ->
(Type'anyPointer'implicitMethodParameter mut -> Type'anyPointer' mut
forall (mut :: Mutability).
Type'anyPointer'implicitMethodParameter mut -> Type'anyPointer' mut
Type'anyPointer'implicitMethodParameter (Type'anyPointer'implicitMethodParameter mut
-> Type'anyPointer' mut)
-> m (Type'anyPointer'implicitMethodParameter mut)
-> m (Type'anyPointer' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> m (Type'anyPointer'implicitMethodParameter mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
struct))
Word16
_ ->
(Type'anyPointer' mut -> m (Type'anyPointer' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Type'anyPointer' mut
forall (mut :: Mutability). Word16 -> Type'anyPointer' mut
Type'anyPointer'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Type'anyPointer' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Type'anyPointer' msg))) => (Type'anyPointer msg) -> (m (Type'anyPointer' msg))
get_Type'anyPointer' :: Type'anyPointer msg -> m (Type'anyPointer' msg)
get_Type'anyPointer' (Type'anyPointer'newtype_ Struct msg
struct) = (Struct msg -> m (Type'anyPointer' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Type'anyPointer'unconstrained :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'anyPointer'unconstrained (Message.Mut s)))) => (Type'anyPointer (Message.Mut s)) -> (m (Type'anyPointer'unconstrained (Message.Mut s)))
set_Type'anyPointer'unconstrained :: Type'anyPointer ('Mut s)
-> m (Type'anyPointer'unconstrained ('Mut s))
set_Type'anyPointer'unconstrained (Type'anyPointer'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
1 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'anyPointer'unconstrained ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'anyPointer'parameter :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'anyPointer'parameter (Message.Mut s)))) => (Type'anyPointer (Message.Mut s)) -> (m (Type'anyPointer'parameter (Message.Mut s)))
set_Type'anyPointer'parameter :: Type'anyPointer ('Mut s) -> m (Type'anyPointer'parameter ('Mut s))
set_Type'anyPointer'parameter (Type'anyPointer'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
1 Int
0 Word64
0)
(Struct ('Mut s) -> m (Type'anyPointer'parameter ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'anyPointer'implicitMethodParameter :: ((Untyped.RWCtx m s)
,(Classes.FromStruct (Message.Mut s) (Type'anyPointer'implicitMethodParameter (Message.Mut s)))) => (Type'anyPointer (Message.Mut s)) -> (m (Type'anyPointer'implicitMethodParameter (Message.Mut s)))
set_Type'anyPointer'implicitMethodParameter :: Type'anyPointer ('Mut s)
-> m (Type'anyPointer'implicitMethodParameter ('Mut s))
set_Type'anyPointer'implicitMethodParameter (Type'anyPointer'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
2 :: Std_.Word16) Int
1 Int
0 Word64
0)
(Struct ('Mut s)
-> m (Type'anyPointer'implicitMethodParameter ('Mut s))
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct ('Mut s)
struct)
)
set_Type'anyPointer'unknown' :: ((Untyped.RWCtx m s)) => (Type'anyPointer (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Type'anyPointer'unknown' :: Type'anyPointer ('Mut s) -> Word16 -> m ()
set_Type'anyPointer'unknown' (Type'anyPointer'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
0 Word64
0)
newtype Type'anyPointer'unconstrained msg
= Type'anyPointer'unconstrained'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'anyPointer'unconstrained msg)) where
fromStruct :: Struct msg -> m (Type'anyPointer'unconstrained msg)
fromStruct Struct msg
struct = (Type'anyPointer'unconstrained msg
-> m (Type'anyPointer'unconstrained msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'anyPointer'unconstrained msg
forall (msg :: Mutability).
Struct msg -> Type'anyPointer'unconstrained msg
Type'anyPointer'unconstrained'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'anyPointer'unconstrained msg)) where
toStruct :: Type'anyPointer'unconstrained msg -> Struct msg
toStruct (Type'anyPointer'unconstrained'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'anyPointer'unconstrained mut) mut) where
message :: Type'anyPointer'unconstrained mut -> Message mut
message (Type'anyPointer'unconstrained'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'anyPointer'unconstrained mut) mut) where
messageDefault :: Message mut -> m (Type'anyPointer'unconstrained mut)
messageDefault Message mut
msg = (Struct mut -> Type'anyPointer'unconstrained mut
forall (msg :: Mutability).
Struct msg -> Type'anyPointer'unconstrained msg
Type'anyPointer'unconstrained'newtype_ (Struct mut -> Type'anyPointer'unconstrained mut)
-> m (Struct mut) -> m (Type'anyPointer'unconstrained mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
data Type'anyPointer'unconstrained' (mut :: Message.Mutability)
= Type'anyPointer'unconstrained'anyKind
| Type'anyPointer'unconstrained'struct
| Type'anyPointer'unconstrained'list
| Type'anyPointer'unconstrained'capability
| Type'anyPointer'unconstrained'unknown' Std_.Word16
instance (Classes.FromStruct mut (Type'anyPointer'unconstrained' mut)) where
fromStruct :: Struct mut -> m (Type'anyPointer'unconstrained' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
5)
case Word16
tag of
Word16
0 ->
(Type'anyPointer'unconstrained' mut
-> m (Type'anyPointer'unconstrained' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type'anyPointer'unconstrained' mut
forall (mut :: Mutability). Type'anyPointer'unconstrained' mut
Type'anyPointer'unconstrained'anyKind)
Word16
1 ->
(Type'anyPointer'unconstrained' mut
-> m (Type'anyPointer'unconstrained' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type'anyPointer'unconstrained' mut
forall (mut :: Mutability). Type'anyPointer'unconstrained' mut
Type'anyPointer'unconstrained'struct)
Word16
2 ->
(Type'anyPointer'unconstrained' mut
-> m (Type'anyPointer'unconstrained' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type'anyPointer'unconstrained' mut
forall (mut :: Mutability). Type'anyPointer'unconstrained' mut
Type'anyPointer'unconstrained'list)
Word16
3 ->
(Type'anyPointer'unconstrained' mut
-> m (Type'anyPointer'unconstrained' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Type'anyPointer'unconstrained' mut
forall (mut :: Mutability). Type'anyPointer'unconstrained' mut
Type'anyPointer'unconstrained'capability)
Word16
_ ->
(Type'anyPointer'unconstrained' mut
-> m (Type'anyPointer'unconstrained' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Type'anyPointer'unconstrained' mut
forall (mut :: Mutability).
Word16 -> Type'anyPointer'unconstrained' mut
Type'anyPointer'unconstrained'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Type'anyPointer'unconstrained' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Type'anyPointer'unconstrained' msg))) => (Type'anyPointer'unconstrained msg) -> (m (Type'anyPointer'unconstrained' msg))
get_Type'anyPointer'unconstrained' :: Type'anyPointer'unconstrained msg
-> m (Type'anyPointer'unconstrained' msg)
get_Type'anyPointer'unconstrained' (Type'anyPointer'unconstrained'newtype_ Struct msg
struct) = (Struct msg -> m (Type'anyPointer'unconstrained' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Type'anyPointer'unconstrained'anyKind :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
set_Type'anyPointer'unconstrained'anyKind :: Type'anyPointer'unconstrained ('Mut s) -> m ()
set_Type'anyPointer'unconstrained'anyKind (Type'anyPointer'unconstrained'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
1 Int
16 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'anyPointer'unconstrained'struct :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
set_Type'anyPointer'unconstrained'struct :: Type'anyPointer'unconstrained ('Mut s) -> m ()
set_Type'anyPointer'unconstrained'struct (Type'anyPointer'unconstrained'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
1 Int
16 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'anyPointer'unconstrained'list :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
set_Type'anyPointer'unconstrained'list :: Type'anyPointer'unconstrained ('Mut s) -> m ()
set_Type'anyPointer'unconstrained'list (Type'anyPointer'unconstrained'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
2 :: Std_.Word16) Int
1 Int
16 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'anyPointer'unconstrained'capability :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> (m ())
set_Type'anyPointer'unconstrained'capability :: Type'anyPointer'unconstrained ('Mut s) -> m ()
set_Type'anyPointer'unconstrained'capability (Type'anyPointer'unconstrained'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
3 :: Std_.Word16) Int
1 Int
16 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Type'anyPointer'unconstrained'unknown' :: ((Untyped.RWCtx m s)) => (Type'anyPointer'unconstrained (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Type'anyPointer'unconstrained'unknown' :: Type'anyPointer'unconstrained ('Mut s) -> Word16 -> m ()
set_Type'anyPointer'unconstrained'unknown' (Type'anyPointer'unconstrained'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
16 Word64
0)
newtype Type'anyPointer'parameter msg
= Type'anyPointer'parameter'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'anyPointer'parameter msg)) where
fromStruct :: Struct msg -> m (Type'anyPointer'parameter msg)
fromStruct Struct msg
struct = (Type'anyPointer'parameter msg -> m (Type'anyPointer'parameter msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'anyPointer'parameter msg
forall (msg :: Mutability).
Struct msg -> Type'anyPointer'parameter msg
Type'anyPointer'parameter'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'anyPointer'parameter msg)) where
toStruct :: Type'anyPointer'parameter msg -> Struct msg
toStruct (Type'anyPointer'parameter'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'anyPointer'parameter mut) mut) where
message :: Type'anyPointer'parameter mut -> Message mut
message (Type'anyPointer'parameter'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'anyPointer'parameter mut) mut) where
messageDefault :: Message mut -> m (Type'anyPointer'parameter mut)
messageDefault Message mut
msg = (Struct mut -> Type'anyPointer'parameter mut
forall (msg :: Mutability).
Struct msg -> Type'anyPointer'parameter msg
Type'anyPointer'parameter'newtype_ (Struct mut -> Type'anyPointer'parameter mut)
-> m (Struct mut) -> m (Type'anyPointer'parameter mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Type'anyPointer'parameter'scopeId :: ((Untyped.ReadCtx m msg)) => (Type'anyPointer'parameter msg) -> (m Std_.Word64)
get_Type'anyPointer'parameter'scopeId :: Type'anyPointer'parameter msg -> m Word64
get_Type'anyPointer'parameter'scopeId (Type'anyPointer'parameter'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
2 Int
0 Word64
0)
set_Type'anyPointer'parameter'scopeId :: ((Untyped.RWCtx m s)) => (Type'anyPointer'parameter (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Type'anyPointer'parameter'scopeId :: Type'anyPointer'parameter ('Mut s) -> Word64 -> m ()
set_Type'anyPointer'parameter'scopeId (Type'anyPointer'parameter'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
2 Int
0 Word64
0)
get_Type'anyPointer'parameter'parameterIndex :: ((Untyped.ReadCtx m msg)) => (Type'anyPointer'parameter msg) -> (m Std_.Word16)
get_Type'anyPointer'parameter'parameterIndex :: Type'anyPointer'parameter msg -> m Word16
get_Type'anyPointer'parameter'parameterIndex (Type'anyPointer'parameter'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
16 Word64
0)
set_Type'anyPointer'parameter'parameterIndex :: ((Untyped.RWCtx m s)) => (Type'anyPointer'parameter (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Type'anyPointer'parameter'parameterIndex :: Type'anyPointer'parameter ('Mut s) -> Word16 -> m ()
set_Type'anyPointer'parameter'parameterIndex (Type'anyPointer'parameter'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
16 Word64
0)
newtype Type'anyPointer'implicitMethodParameter msg
= Type'anyPointer'implicitMethodParameter'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Type'anyPointer'implicitMethodParameter msg)) where
fromStruct :: Struct msg -> m (Type'anyPointer'implicitMethodParameter msg)
fromStruct Struct msg
struct = (Type'anyPointer'implicitMethodParameter msg
-> m (Type'anyPointer'implicitMethodParameter msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Type'anyPointer'implicitMethodParameter msg
forall (msg :: Mutability).
Struct msg -> Type'anyPointer'implicitMethodParameter msg
Type'anyPointer'implicitMethodParameter'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Type'anyPointer'implicitMethodParameter msg)) where
toStruct :: Type'anyPointer'implicitMethodParameter msg -> Struct msg
toStruct (Type'anyPointer'implicitMethodParameter'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Type'anyPointer'implicitMethodParameter mut) mut) where
message :: Type'anyPointer'implicitMethodParameter mut -> Message mut
message (Type'anyPointer'implicitMethodParameter'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Type'anyPointer'implicitMethodParameter mut) mut) where
messageDefault :: Message mut -> m (Type'anyPointer'implicitMethodParameter mut)
messageDefault Message mut
msg = (Struct mut -> Type'anyPointer'implicitMethodParameter mut
forall (msg :: Mutability).
Struct msg -> Type'anyPointer'implicitMethodParameter msg
Type'anyPointer'implicitMethodParameter'newtype_ (Struct mut -> Type'anyPointer'implicitMethodParameter mut)
-> m (Struct mut)
-> m (Type'anyPointer'implicitMethodParameter mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
get_Type'anyPointer'implicitMethodParameter'parameterIndex :: ((Untyped.ReadCtx m msg)) => (Type'anyPointer'implicitMethodParameter msg) -> (m Std_.Word16)
get_Type'anyPointer'implicitMethodParameter'parameterIndex :: Type'anyPointer'implicitMethodParameter msg -> m Word16
get_Type'anyPointer'implicitMethodParameter'parameterIndex (Type'anyPointer'implicitMethodParameter'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
1 Int
16 Word64
0)
set_Type'anyPointer'implicitMethodParameter'parameterIndex :: ((Untyped.RWCtx m s)) => (Type'anyPointer'implicitMethodParameter (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Type'anyPointer'implicitMethodParameter'parameterIndex :: Type'anyPointer'implicitMethodParameter ('Mut s) -> Word16 -> m ()
set_Type'anyPointer'implicitMethodParameter'parameterIndex (Type'anyPointer'implicitMethodParameter'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
16 Word64
0)
newtype Brand msg
= Brand'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Brand msg)) where
fromStruct :: Struct msg -> m (Brand msg)
fromStruct Struct msg
struct = (Brand msg -> m (Brand msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Brand msg
forall (msg :: Mutability). Struct msg -> Brand msg
Brand'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Brand msg)) where
toStruct :: Brand msg -> Struct msg
toStruct (Brand'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Brand mut) mut) where
message :: Brand mut -> Message mut
message (Brand'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Brand mut) mut) where
messageDefault :: Message mut -> m (Brand mut)
messageDefault Message mut
msg = (Struct mut -> Brand mut
forall (msg :: Mutability). Struct msg -> Brand msg
Brand'newtype_ (Struct mut -> Brand mut) -> m (Struct mut) -> m (Brand mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Brand msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Brand msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Brand msg
forall (msg :: Mutability). Struct msg -> Brand msg
Brand'newtype_ (Struct msg -> Brand msg) -> m (Struct msg) -> m (Brand msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Brand (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Brand'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Brand (Message.Mut s))) where
new :: Message ('Mut s) -> m (Brand ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Brand ('Mut s)
forall (msg :: Mutability). Struct msg -> Brand msg
Brand'newtype_ (Struct ('Mut s) -> Brand ('Mut s))
-> m (Struct ('Mut s)) -> m (Brand ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
0 Word16
1))
instance (Basics.ListElem mut (Brand mut)) where
newtype List mut (Brand mut)
= Brand'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Brand mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Brand mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Brand mut)
Brand'List_ (ListOf mut (Struct mut) -> List mut (Brand mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Brand mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Brand mut) -> List mut
toUntypedList (Brand'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Brand mut) -> Int
length (Brand'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Brand mut) -> m (Brand mut)
index Int
i (Brand'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Brand mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Brand (Message.Mut s))) where
setIndex :: Brand ('Mut s) -> Int -> List ('Mut s) (Brand ('Mut s)) -> m ()
setIndex (Brand'newtype_ Struct ('Mut s)
elt) Int
i (Brand'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Brand ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s)) -> List ('Mut s) (Brand ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Brand mut)
Brand'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Brand ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Brand ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
0 Word16
1 Int
len))
get_Brand'scopes :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Brand'Scope msg)))) => (Brand msg) -> (m (Basics.List msg (Brand'Scope msg)))
get_Brand'scopes :: Brand msg -> m (List msg (Brand'Scope msg))
get_Brand'scopes (Brand'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Brand'Scope msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Brand'scopes :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Brand'Scope (Message.Mut s))))) => (Brand (Message.Mut s)) -> (Basics.List (Message.Mut s) (Brand'Scope (Message.Mut s))) -> (m ())
set_Brand'scopes :: Brand ('Mut s) -> List ('Mut s) (Brand'Scope ('Mut s)) -> m ()
set_Brand'scopes (Brand'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Brand'Scope ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Brand'Scope ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Brand'Scope ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Brand'scopes :: ((Untyped.ReadCtx m msg)) => (Brand msg) -> (m Std_.Bool)
has_Brand'scopes :: Brand msg -> m Bool
has_Brand'scopes (Brand'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Brand'scopes :: ((Untyped.RWCtx m s)) => Std_.Int -> (Brand (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Brand'Scope (Message.Mut s))))
new_Brand'scopes :: Int -> Brand ('Mut s) -> m (List ('Mut s) (Brand'Scope ('Mut s)))
new_Brand'scopes Int
len Brand ('Mut s)
struct = (do
List ('Mut s) (Brand'Scope ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Brand'Scope ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (Brand ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Brand ('Mut s)
struct) Int
len)
(Brand ('Mut s) -> List ('Mut s) (Brand'Scope ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Brand'Scope ('Mut s)))) =>
Brand ('Mut s) -> List ('Mut s) (Brand'Scope ('Mut s)) -> m ()
set_Brand'scopes Brand ('Mut s)
struct List ('Mut s) (Brand'Scope ('Mut s))
result)
(List ('Mut s) (Brand'Scope ('Mut s))
-> m (List ('Mut s) (Brand'Scope ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Brand'Scope ('Mut s))
result)
)
newtype Brand'Scope msg
= Brand'Scope'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Brand'Scope msg)) where
fromStruct :: Struct msg -> m (Brand'Scope msg)
fromStruct Struct msg
struct = (Brand'Scope msg -> m (Brand'Scope msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Brand'Scope msg
forall (msg :: Mutability). Struct msg -> Brand'Scope msg
Brand'Scope'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Brand'Scope msg)) where
toStruct :: Brand'Scope msg -> Struct msg
toStruct (Brand'Scope'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Brand'Scope mut) mut) where
message :: Brand'Scope mut -> Message mut
message (Brand'Scope'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Brand'Scope mut) mut) where
messageDefault :: Message mut -> m (Brand'Scope mut)
messageDefault Message mut
msg = (Struct mut -> Brand'Scope mut
forall (msg :: Mutability). Struct msg -> Brand'Scope msg
Brand'Scope'newtype_ (Struct mut -> Brand'Scope mut)
-> m (Struct mut) -> m (Brand'Scope mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Brand'Scope msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Brand'Scope msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Brand'Scope msg
forall (msg :: Mutability). Struct msg -> Brand'Scope msg
Brand'Scope'newtype_ (Struct msg -> Brand'Scope msg)
-> m (Struct msg) -> m (Brand'Scope msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Brand'Scope (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> Brand'Scope ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Brand'Scope'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Brand'Scope (Message.Mut s))) where
new :: Message ('Mut s) -> m (Brand'Scope ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Brand'Scope ('Mut s)
forall (msg :: Mutability). Struct msg -> Brand'Scope msg
Brand'Scope'newtype_ (Struct ('Mut s) -> Brand'Scope ('Mut s))
-> m (Struct ('Mut s)) -> m (Brand'Scope ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
2 Word16
1))
instance (Basics.ListElem mut (Brand'Scope mut)) where
newtype List mut (Brand'Scope mut)
= Brand'Scope'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Brand'Scope mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Brand'Scope mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Brand'Scope mut)
Brand'Scope'List_ (ListOf mut (Struct mut) -> List mut (Brand'Scope mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Brand'Scope mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Brand'Scope mut) -> List mut
toUntypedList (Brand'Scope'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Brand'Scope mut) -> Int
length (Brand'Scope'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Brand'Scope mut) -> m (Brand'Scope mut)
index Int
i (Brand'Scope'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Brand'Scope mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Brand'Scope (Message.Mut s))) where
setIndex :: Brand'Scope ('Mut s)
-> Int -> List ('Mut s) (Brand'Scope ('Mut s)) -> m ()
setIndex (Brand'Scope'newtype_ Struct ('Mut s)
elt) Int
i (Brand'Scope'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Brand'Scope ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Brand'Scope ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Brand'Scope mut)
Brand'Scope'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Brand'Scope ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Brand'Scope ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
2 Word16
1 Int
len))
get_Brand'Scope'scopeId :: ((Untyped.ReadCtx m msg)) => (Brand'Scope msg) -> (m Std_.Word64)
get_Brand'Scope'scopeId :: Brand'Scope msg -> m Word64
get_Brand'Scope'scopeId (Brand'Scope'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Brand'Scope'scopeId :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Brand'Scope'scopeId :: Brand'Scope ('Mut s) -> Word64 -> m ()
set_Brand'Scope'scopeId (Brand'Scope'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
data Brand'Scope' (mut :: Message.Mutability)
= Brand'Scope'bind (Basics.List mut (Brand'Binding mut))
| Brand'Scope'inherit
| Brand'Scope'unknown' Std_.Word16
instance (Classes.FromStruct mut (Brand'Scope' mut)) where
fromStruct :: Struct mut -> m (Brand'Scope' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
4)
case Word16
tag of
Word16
0 ->
(List mut (Brand'Binding mut) -> Brand'Scope' mut
forall (mut :: Mutability).
List mut (Brand'Binding mut) -> Brand'Scope' mut
Brand'Scope'bind (List mut (Brand'Binding mut) -> Brand'Scope' mut)
-> m (List mut (Brand'Binding mut)) -> m (Brand'Scope' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (List mut (Brand'Binding mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
1 ->
(Brand'Scope' mut -> m (Brand'Scope' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand'Scope' mut
forall (mut :: Mutability). Brand'Scope' mut
Brand'Scope'inherit)
Word16
_ ->
(Brand'Scope' mut -> m (Brand'Scope' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Brand'Scope' mut
forall (mut :: Mutability). Word16 -> Brand'Scope' mut
Brand'Scope'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Brand'Scope' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Brand'Scope' msg))) => (Brand'Scope msg) -> (m (Brand'Scope' msg))
get_Brand'Scope' :: Brand'Scope msg -> m (Brand'Scope' msg)
get_Brand'Scope' (Brand'Scope'newtype_ Struct msg
struct) = (Struct msg -> m (Brand'Scope' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Brand'Scope'bind :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Brand'Binding (Message.Mut s))))) => (Brand'Scope (Message.Mut s)) -> (Basics.List (Message.Mut s) (Brand'Binding (Message.Mut s))) -> (m ())
set_Brand'Scope'bind :: Brand'Scope ('Mut s)
-> List ('Mut s) (Brand'Binding ('Mut s)) -> m ()
set_Brand'Scope'bind (Brand'Scope'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Brand'Binding ('Mut s))
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
1 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Brand'Binding ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Brand'Binding ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Brand'Scope'inherit :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.Mut s)) -> (m ())
set_Brand'Scope'inherit :: Brand'Scope ('Mut s) -> m ()
set_Brand'Scope'inherit (Brand'Scope'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
1 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Brand'Scope'unknown' :: ((Untyped.RWCtx m s)) => (Brand'Scope (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Brand'Scope'unknown' :: Brand'Scope ('Mut s) -> Word16 -> m ()
set_Brand'Scope'unknown' (Brand'Scope'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
1 Int
0 Word64
0)
newtype Brand'Binding msg
= Brand'Binding'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Brand'Binding msg)) where
fromStruct :: Struct msg -> m (Brand'Binding msg)
fromStruct Struct msg
struct = (Brand'Binding msg -> m (Brand'Binding msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Brand'Binding msg
forall (msg :: Mutability). Struct msg -> Brand'Binding msg
Brand'Binding'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Brand'Binding msg)) where
toStruct :: Brand'Binding msg -> Struct msg
toStruct (Brand'Binding'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Brand'Binding mut) mut) where
message :: Brand'Binding mut -> Message mut
message (Brand'Binding'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Brand'Binding mut) mut) where
messageDefault :: Message mut -> m (Brand'Binding mut)
messageDefault Message mut
msg = (Struct mut -> Brand'Binding mut
forall (msg :: Mutability). Struct msg -> Brand'Binding msg
Brand'Binding'newtype_ (Struct mut -> Brand'Binding mut)
-> m (Struct mut) -> m (Brand'Binding mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Brand'Binding msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Brand'Binding msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Brand'Binding msg
forall (msg :: Mutability). Struct msg -> Brand'Binding msg
Brand'Binding'newtype_ (Struct msg -> Brand'Binding msg)
-> m (Struct msg) -> m (Brand'Binding msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Brand'Binding (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> Brand'Binding ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Brand'Binding'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Brand'Binding (Message.Mut s))) where
new :: Message ('Mut s) -> m (Brand'Binding ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Brand'Binding ('Mut s)
forall (msg :: Mutability). Struct msg -> Brand'Binding msg
Brand'Binding'newtype_ (Struct ('Mut s) -> Brand'Binding ('Mut s))
-> m (Struct ('Mut s)) -> m (Brand'Binding ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
1))
instance (Basics.ListElem mut (Brand'Binding mut)) where
newtype List mut (Brand'Binding mut)
= Brand'Binding'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Brand'Binding mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Brand'Binding mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Brand'Binding mut)
Brand'Binding'List_ (ListOf mut (Struct mut) -> List mut (Brand'Binding mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Brand'Binding mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Brand'Binding mut) -> List mut
toUntypedList (Brand'Binding'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Brand'Binding mut) -> Int
length (Brand'Binding'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Brand'Binding mut) -> m (Brand'Binding mut)
index Int
i (Brand'Binding'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Brand'Binding mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Brand'Binding (Message.Mut s))) where
setIndex :: Brand'Binding ('Mut s)
-> Int -> List ('Mut s) (Brand'Binding ('Mut s)) -> m ()
setIndex (Brand'Binding'newtype_ Struct ('Mut s)
elt) Int
i (Brand'Binding'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (Brand'Binding ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Brand'Binding ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Brand'Binding mut)
Brand'Binding'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Brand'Binding ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Brand'Binding ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
1 Int
len))
data Brand'Binding' (mut :: Message.Mutability)
= Brand'Binding'unbound
| Brand'Binding'type_ (Type mut)
| Brand'Binding'unknown' Std_.Word16
instance (Classes.FromStruct mut (Brand'Binding' mut)) where
fromStruct :: Struct mut -> m (Brand'Binding' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
0)
case Word16
tag of
Word16
0 ->
(Brand'Binding' mut -> m (Brand'Binding' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand'Binding' mut
forall (mut :: Mutability). Brand'Binding' mut
Brand'Binding'unbound)
Word16
1 ->
(Type mut -> Brand'Binding' mut
forall (mut :: Mutability). Type mut -> Brand'Binding' mut
Brand'Binding'type_ (Type mut -> Brand'Binding' mut)
-> m (Type mut) -> m (Brand'Binding' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (Type mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
_ ->
(Brand'Binding' mut -> m (Brand'Binding' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Brand'Binding' mut
forall (mut :: Mutability). Word16 -> Brand'Binding' mut
Brand'Binding'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Brand'Binding' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Brand'Binding' msg))) => (Brand'Binding msg) -> (m (Brand'Binding' msg))
get_Brand'Binding' :: Brand'Binding msg -> m (Brand'Binding' msg)
get_Brand'Binding' (Brand'Binding'newtype_ Struct msg
struct) = (Struct msg -> m (Brand'Binding' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Brand'Binding'unbound :: ((Untyped.RWCtx m s)) => (Brand'Binding (Message.Mut s)) -> (m ())
set_Brand'Binding'unbound :: Brand'Binding ('Mut s) -> m ()
set_Brand'Binding'unbound (Brand'Binding'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Brand'Binding'type_ :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Type (Message.Mut s)))) => (Brand'Binding (Message.Mut s)) -> (Type (Message.Mut s)) -> (m ())
set_Brand'Binding'type_ :: Brand'Binding ('Mut s) -> Type ('Mut s) -> m ()
set_Brand'Binding'type_ (Brand'Binding'newtype_ Struct ('Mut s)
struct) Type ('Mut s)
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
0 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Type ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Type ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Brand'Binding'unknown' :: ((Untyped.RWCtx m s)) => (Brand'Binding (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Brand'Binding'unknown' :: Brand'Binding ('Mut s) -> Word16 -> m ()
set_Brand'Binding'unknown' (Brand'Binding'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
newtype Value msg
= Value'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Value msg)) where
fromStruct :: Struct msg -> m (Value msg)
fromStruct Struct msg
struct = (Value msg -> m (Value msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Value msg
forall (msg :: Mutability). Struct msg -> Value msg
Value'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Value msg)) where
toStruct :: Value msg -> Struct msg
toStruct (Value'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Value mut) mut) where
message :: Value mut -> Message mut
message (Value'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Value mut) mut) where
messageDefault :: Message mut -> m (Value mut)
messageDefault Message mut
msg = (Struct mut -> Value mut
forall (msg :: Mutability). Struct msg -> Value msg
Value'newtype_ (Struct mut -> Value mut) -> m (Struct mut) -> m (Value mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Value msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Value msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Value msg
forall (msg :: Mutability). Struct msg -> Value msg
Value'newtype_ (Struct msg -> Value msg) -> m (Struct msg) -> m (Value msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Value (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Value ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Value'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Value (Message.Mut s))) where
new :: Message ('Mut s) -> m (Value ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Value ('Mut s)
forall (msg :: Mutability). Struct msg -> Value msg
Value'newtype_ (Struct ('Mut s) -> Value ('Mut s))
-> m (Struct ('Mut s)) -> m (Value ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
2 Word16
1))
instance (Basics.ListElem mut (Value mut)) where
newtype List mut (Value mut)
= Value'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Value mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Value mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Value mut)
Value'List_ (ListOf mut (Struct mut) -> List mut (Value mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Value mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Value mut) -> List mut
toUntypedList (Value'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Value mut) -> Int
length (Value'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Value mut) -> m (Value mut)
index Int
i (Value'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Value mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Value (Message.Mut s))) where
setIndex :: Value ('Mut s) -> Int -> List ('Mut s) (Value ('Mut s)) -> m ()
setIndex (Value'newtype_ Struct ('Mut s)
elt) Int
i (Value'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Value ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s)) -> List ('Mut s) (Value ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Value mut)
Value'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Value ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Value ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
2 Word16
1 Int
len))
data Value' (mut :: Message.Mutability)
= Value'void
| Value'bool Std_.Bool
| Value'int8 Std_.Int8
| Value'int16 Std_.Int16
| Value'int32 Std_.Int32
| Value'int64 Std_.Int64
| Value'uint8 Std_.Word8
| Value'uint16 Std_.Word16
| Value'uint32 Std_.Word32
| Value'uint64 Std_.Word64
| Value'float32 Std_.Float
| Value'float64 Std_.Double
| Value'text (Basics.Text mut)
| Value'data_ (Basics.Data mut)
| Value'list (Std_.Maybe (Untyped.Ptr mut))
| Value'enum Std_.Word16
| Value'struct (Std_.Maybe (Untyped.Ptr mut))
| Value'interface
| Value'anyPointer (Std_.Maybe (Untyped.Ptr mut))
| Value'unknown' Std_.Word16
instance (Classes.FromStruct mut (Value' mut)) where
fromStruct :: Struct mut -> m (Value' mut)
fromStruct Struct mut
struct = (do
Word16
tag <- (Struct mut -> Int -> m Word16
forall (m :: * -> *) (mut :: Mutability).
ReadCtx m mut =>
Struct mut -> Int -> m Word16
GenHelpers.getTag Struct mut
struct Int
0)
case Word16
tag of
Word16
0 ->
(Value' mut -> m (Value' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Value' mut
forall (mut :: Mutability). Value' mut
Value'void)
Word16
1 ->
(Bool -> Value' mut
forall (mut :: Mutability). Bool -> Value' mut
Value'bool (Bool -> Value' mut) -> m Bool -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Bool
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
16 Word64
0))
Word16
2 ->
(Int8 -> Value' mut
forall (mut :: Mutability). Int8 -> Value' mut
Value'int8 (Int8 -> Value' mut) -> m Int8 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Int8
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
16 Word64
0))
Word16
3 ->
(Int16 -> Value' mut
forall (mut :: Mutability). Int16 -> Value' mut
Value'int16 (Int16 -> Value' mut) -> m Int16 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Int16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
16 Word64
0))
Word16
4 ->
(Int32 -> Value' mut
forall (mut :: Mutability). Int32 -> Value' mut
Value'int32 (Int32 -> Value' mut) -> m Int32 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Int32
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
32 Word64
0))
Word16
5 ->
(Int64 -> Value' mut
forall (mut :: Mutability). Int64 -> Value' mut
Value'int64 (Int64 -> Value' mut) -> m Int64 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Int64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
1 Int
0 Word64
0))
Word16
6 ->
(Word8 -> Value' mut
forall (mut :: Mutability). Word8 -> Value' mut
Value'uint8 (Word8 -> Value' mut) -> m Word8 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Word8
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
16 Word64
0))
Word16
7 ->
(Word16 -> Value' mut
forall (mut :: Mutability). Word16 -> Value' mut
Value'uint16 (Word16 -> Value' mut) -> m Word16 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
16 Word64
0))
Word16
8 ->
(Word32 -> Value' mut
forall (mut :: Mutability). Word32 -> Value' mut
Value'uint32 (Word32 -> Value' mut) -> m Word32 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Word32
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
32 Word64
0))
Word16
9 ->
(Word64 -> Value' mut
forall (mut :: Mutability). Word64 -> Value' mut
Value'uint64 (Word64 -> Value' mut) -> m Word64 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
1 Int
0 Word64
0))
Word16
10 ->
(Float -> Value' mut
forall (mut :: Mutability). Float -> Value' mut
Value'float32 (Float -> Value' mut) -> m Float -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Float
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
32 Word64
0))
Word16
11 ->
(Double -> Value' mut
forall (mut :: Mutability). Double -> Value' mut
Value'float64 (Double -> Value' mut) -> m Double -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Double
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
1 Int
0 Word64
0))
Word16
12 ->
(Text mut -> Value' mut
forall (mut :: Mutability). Text mut -> Value' mut
Value'text (Text mut -> Value' mut) -> m (Text mut) -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (Text mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
13 ->
(Data mut -> Value' mut
forall (mut :: Mutability). Data mut -> Value' mut
Value'data_ (Data mut -> Value' mut) -> m (Data mut) -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (Data mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
14 ->
(Maybe (Ptr mut) -> Value' mut
forall (mut :: Mutability). Maybe (Ptr mut) -> Value' mut
Value'list (Maybe (Ptr mut) -> Value' mut)
-> m (Maybe (Ptr mut)) -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (Maybe (Ptr mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
15 ->
(Word16 -> Value' mut
forall (mut :: Mutability). Word16 -> Value' mut
Value'enum (Word16 -> Value' mut) -> m Word16 -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Struct mut -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct mut
struct Int
0 Int
16 Word64
0))
Word16
16 ->
(Maybe (Ptr mut) -> Value' mut
forall (mut :: Mutability). Maybe (Ptr mut) -> Value' mut
Value'struct (Maybe (Ptr mut) -> Value' mut)
-> m (Maybe (Ptr mut)) -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (Maybe (Ptr mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
17 ->
(Value' mut -> m (Value' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Value' mut
forall (mut :: Mutability). Value' mut
Value'interface)
Word16
18 ->
(Maybe (Ptr mut) -> Value' mut
forall (mut :: Mutability). Maybe (Ptr mut) -> Value' mut
Value'anyPointer (Maybe (Ptr mut) -> Value' mut)
-> m (Maybe (Ptr mut)) -> m (Value' mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (do
Maybe (Ptr mut)
ptr <- (Int -> Struct mut -> m (Maybe (Ptr mut))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct mut
struct)
(Message mut -> Maybe (Ptr mut) -> m (Maybe (Ptr mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct) Maybe (Ptr mut)
ptr)
))
Word16
_ ->
(Value' mut -> m (Value' mut)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Word16 -> Value' mut
forall (mut :: Mutability). Word16 -> Value' mut
Value'unknown' (Word16 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)))
)
get_Value' :: ((Untyped.ReadCtx m msg)
,(Classes.FromStruct msg (Value' msg))) => (Value msg) -> (m (Value' msg))
get_Value' :: Value msg -> m (Value' msg)
get_Value' (Value'newtype_ Struct msg
struct) = (Struct msg -> m (Value' msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct msg
struct)
set_Value'void :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> (m ())
set_Value'void :: Value ('Mut s) -> m ()
set_Value'void (Value'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
0 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Value'bool :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Bool -> (m ())
set_Value'bool :: Value ('Mut s) -> Bool -> m ()
set_Value'bool (Value'newtype_ Struct ('Mut s)
struct) Bool
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
1 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word1 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word1
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Bool -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Bool
value)) :: Std_.Word1) Int
0 Int
16 Word64
0)
)
set_Value'int8 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int8 -> (m ())
set_Value'int8 :: Value ('Mut s) -> Int8 -> m ()
set_Value'int8 (Value'newtype_ Struct ('Mut s)
struct) Int8
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
2 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word8 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word8
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Int8 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Int8
value)) :: Std_.Word8) Int
0 Int
16 Word64
0)
)
set_Value'int16 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int16 -> (m ())
set_Value'int16 :: Value ('Mut s) -> Int16 -> m ()
set_Value'int16 (Value'newtype_ Struct ('Mut s)
struct) Int16
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
3 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Int16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Int16
value)) :: Std_.Word16) Int
0 Int
16 Word64
0)
)
set_Value'int32 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int32 -> (m ())
set_Value'int32 :: Value ('Mut s) -> Int32 -> m ()
set_Value'int32 (Value'newtype_ Struct ('Mut s)
struct) Int32
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
4 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word32 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Int32 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Int32
value)) :: Std_.Word32) Int
0 Int
32 Word64
0)
)
set_Value'int64 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Int64 -> (m ())
set_Value'int64 :: Value ('Mut s) -> Int64 -> m ()
set_Value'int64 (Value'newtype_ Struct ('Mut s)
struct) Int64
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
5 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Int64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Int64
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
)
set_Value'uint8 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word8 -> (m ())
set_Value'uint8 :: Value ('Mut s) -> Word8 -> m ()
set_Value'uint8 (Value'newtype_ Struct ('Mut s)
struct) Word8
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
6 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word8 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word8
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word8 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word8
value)) :: Std_.Word8) Int
0 Int
16 Word64
0)
)
set_Value'uint16 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Value'uint16 :: Value ('Mut s) -> Word16 -> m ()
set_Value'uint16 (Value'newtype_ Struct ('Mut s)
struct) Word16
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
7 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
16 Word64
0)
)
set_Value'uint32 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word32 -> (m ())
set_Value'uint32 :: Value ('Mut s) -> Word32 -> m ()
set_Value'uint32 (Value'newtype_ Struct ('Mut s)
struct) Word32
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
8 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word32 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word32 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word32
value)) :: Std_.Word32) Int
0 Int
32 Word64
0)
)
set_Value'uint64 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Value'uint64 :: Value ('Mut s) -> Word64 -> m ()
set_Value'uint64 (Value'newtype_ Struct ('Mut s)
struct) Word64
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
9 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
)
set_Value'float32 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Float -> (m ())
set_Value'float32 :: Value ('Mut s) -> Float -> m ()
set_Value'float32 (Value'newtype_ Struct ('Mut s)
struct) Float
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
10 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word32 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Float -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Float
value)) :: Std_.Word32) Int
0 Int
32 Word64
0)
)
set_Value'float64 :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Double -> (m ())
set_Value'float64 :: Value ('Mut s) -> Double -> m ()
set_Value'float64 (Value'newtype_ Struct ('Mut s)
struct) Double
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
11 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Double -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Double
value)) :: Std_.Word64) Int
1 Int
0 Word64
0)
)
set_Value'text :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (Value (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_Value'text :: Value ('Mut s) -> Text ('Mut s) -> m ()
set_Value'text (Value'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
12 :: Std_.Word16) Int
0 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Value'data_ :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Data (Message.Mut s)))) => (Value (Message.Mut s)) -> (Basics.Data (Message.Mut s)) -> (m ())
set_Value'data_ :: Value ('Mut s) -> Data ('Mut s) -> m ()
set_Value'data_ (Value'newtype_ Struct ('Mut s)
struct) Data ('Mut s)
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
13 :: Std_.Word16) Int
0 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Data ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Data ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Value'list :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Value (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
set_Value'list :: Value ('Mut s) -> Maybe (Ptr ('Mut s)) -> m ()
set_Value'list (Value'newtype_ Struct ('Mut s)
struct) Maybe (Ptr ('Mut s))
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
14 :: Std_.Word16) Int
0 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Maybe (Ptr ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Value'enum :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Value'enum :: Value ('Mut s) -> Word16 -> m ()
set_Value'enum (Value'newtype_ Struct ('Mut s)
struct) Word16
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
15 :: Std_.Word16) Int
0 Int
0 Word64
0)
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
16 Word64
0)
)
set_Value'struct :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Value (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
set_Value'struct :: Value ('Mut s) -> Maybe (Ptr ('Mut s)) -> m ()
set_Value'struct (Value'newtype_ Struct ('Mut s)
struct) Maybe (Ptr ('Mut s))
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
16 :: Std_.Word16) Int
0 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Maybe (Ptr ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Value'interface :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> (m ())
set_Value'interface :: Value ('Mut s) -> m ()
set_Value'interface (Value'newtype_ Struct ('Mut s)
struct) = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
17 :: Std_.Word16) Int
0 Int
0 Word64
0)
(() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
)
set_Value'anyPointer :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Std_.Maybe (Untyped.Ptr (Message.Mut s))))) => (Value (Message.Mut s)) -> (Std_.Maybe (Untyped.Ptr (Message.Mut s))) -> (m ())
set_Value'anyPointer :: Value ('Mut s) -> Maybe (Ptr ('Mut s)) -> m ()
set_Value'anyPointer (Value'newtype_ Struct ('Mut s)
struct) Maybe (Ptr ('Mut s))
value = (do
(Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct (Word16
18 :: Std_.Word16) Int
0 Int
0 Word64
0)
(do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Maybe (Ptr ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
)
set_Value'unknown' :: ((Untyped.RWCtx m s)) => (Value (Message.Mut s)) -> Std_.Word16 -> (m ())
set_Value'unknown' :: Value ('Mut s) -> Word16 -> m ()
set_Value'unknown' (Value'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
newtype Annotation msg
= Annotation'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Annotation msg)) where
fromStruct :: Struct msg -> m (Annotation msg)
fromStruct Struct msg
struct = (Annotation msg -> m (Annotation msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Annotation msg
forall (msg :: Mutability). Struct msg -> Annotation msg
Annotation'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Annotation msg)) where
toStruct :: Annotation msg -> Struct msg
toStruct (Annotation'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Annotation mut) mut) where
message :: Annotation mut -> Message mut
message (Annotation'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (Annotation mut) mut) where
messageDefault :: Message mut -> m (Annotation mut)
messageDefault Message mut
msg = (Struct mut -> Annotation mut
forall (msg :: Mutability). Struct msg -> Annotation msg
Annotation'newtype_ (Struct mut -> Annotation mut)
-> m (Struct mut) -> m (Annotation mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (Annotation msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (Annotation msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Annotation msg
forall (msg :: Mutability). Struct msg -> Annotation msg
Annotation'newtype_ (Struct msg -> Annotation msg)
-> m (Struct msg) -> m (Annotation msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Annotation (Message.Mut s))) where
toPtr :: Message ('Mut s) -> Annotation ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Annotation'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (Annotation (Message.Mut s))) where
new :: Message ('Mut s) -> m (Annotation ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Annotation ('Mut s)
forall (msg :: Mutability). Struct msg -> Annotation msg
Annotation'newtype_ (Struct ('Mut s) -> Annotation ('Mut s))
-> m (Struct ('Mut s)) -> m (Annotation ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
2))
instance (Basics.ListElem mut (Annotation mut)) where
newtype List mut (Annotation mut)
= Annotation'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (Annotation mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (Annotation mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Annotation mut)
Annotation'List_ (ListOf mut (Struct mut) -> List mut (Annotation mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (Annotation mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (Annotation mut) -> List mut
toUntypedList (Annotation'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (Annotation mut) -> Int
length (Annotation'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (Annotation mut) -> m (Annotation mut)
index Int
i (Annotation'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (Annotation mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (Annotation (Message.Mut s))) where
setIndex :: Annotation ('Mut s)
-> Int -> List ('Mut s) (Annotation ('Mut s)) -> m ()
setIndex (Annotation'newtype_ Struct ('Mut s)
elt) Int
i (Annotation'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) (Annotation ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Annotation ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (Annotation mut)
Annotation'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Annotation ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (Annotation ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
2 Int
len))
get_Annotation'id :: ((Untyped.ReadCtx m msg)) => (Annotation msg) -> (m Std_.Word64)
get_Annotation'id :: Annotation msg -> m Word64
get_Annotation'id (Annotation'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_Annotation'id :: ((Untyped.RWCtx m s)) => (Annotation (Message.Mut s)) -> Std_.Word64 -> (m ())
set_Annotation'id :: Annotation ('Mut s) -> Word64 -> m ()
set_Annotation'id (Annotation'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
get_Annotation'value :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Value msg))) => (Annotation msg) -> (m (Value msg))
get_Annotation'value :: Annotation msg -> m (Value msg)
get_Annotation'value (Annotation'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Value msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Annotation'value :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Value (Message.Mut s)))) => (Annotation (Message.Mut s)) -> (Value (Message.Mut s)) -> (m ())
set_Annotation'value :: Annotation ('Mut s) -> Value ('Mut s) -> m ()
set_Annotation'value (Annotation'newtype_ Struct ('Mut s)
struct) Value ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Value ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Value ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_Annotation'value :: ((Untyped.ReadCtx m msg)) => (Annotation msg) -> (m Std_.Bool)
has_Annotation'value :: Annotation msg -> m Bool
has_Annotation'value (Annotation'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_Annotation'value :: ((Untyped.RWCtx m s)) => (Annotation (Message.Mut s)) -> (m (Value (Message.Mut s)))
new_Annotation'value :: Annotation ('Mut s) -> m (Value ('Mut s))
new_Annotation'value Annotation ('Mut s)
struct = (do
Value ('Mut s)
result <- (Message ('Mut s) -> m (Value ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Annotation ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Annotation ('Mut s)
struct))
(Annotation ('Mut s) -> Value ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Value ('Mut s))) =>
Annotation ('Mut s) -> Value ('Mut s) -> m ()
set_Annotation'value Annotation ('Mut s)
struct Value ('Mut s)
result)
(Value ('Mut s) -> m (Value ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Value ('Mut s)
result)
)
get_Annotation'brand :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Brand msg))) => (Annotation msg) -> (m (Brand msg))
get_Annotation'brand :: Annotation msg -> m (Brand msg)
get_Annotation'brand (Annotation'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Brand msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_Annotation'brand :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Brand (Message.Mut s)))) => (Annotation (Message.Mut s)) -> (Brand (Message.Mut s)) -> (m ())
set_Annotation'brand :: Annotation ('Mut s) -> Brand ('Mut s) -> m ()
set_Annotation'brand (Annotation'newtype_ Struct ('Mut s)
struct) Brand ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Brand ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Brand ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_Annotation'brand :: ((Untyped.ReadCtx m msg)) => (Annotation msg) -> (m Std_.Bool)
has_Annotation'brand :: Annotation msg -> m Bool
has_Annotation'brand (Annotation'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_Annotation'brand :: ((Untyped.RWCtx m s)) => (Annotation (Message.Mut s)) -> (m (Brand (Message.Mut s)))
new_Annotation'brand :: Annotation ('Mut s) -> m (Brand ('Mut s))
new_Annotation'brand Annotation ('Mut s)
struct = (do
Brand ('Mut s)
result <- (Message ('Mut s) -> m (Brand ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (Annotation ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Annotation ('Mut s)
struct))
(Annotation ('Mut s) -> Brand ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Brand ('Mut s))) =>
Annotation ('Mut s) -> Brand ('Mut s) -> m ()
set_Annotation'brand Annotation ('Mut s)
struct Brand ('Mut s)
result)
(Brand ('Mut s) -> m (Brand ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Brand ('Mut s)
result)
)
data ElementSize
= ElementSize'empty
| ElementSize'bit
| ElementSize'byte
| ElementSize'twoBytes
| ElementSize'fourBytes
| ElementSize'eightBytes
| ElementSize'pointer
| ElementSize'inlineComposite
| ElementSize'unknown' Std_.Word16
deriving(Int -> ElementSize -> ShowS
[ElementSize] -> ShowS
ElementSize -> String
(Int -> ElementSize -> ShowS)
-> (ElementSize -> String)
-> ([ElementSize] -> ShowS)
-> Show ElementSize
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElementSize] -> ShowS
$cshowList :: [ElementSize] -> ShowS
show :: ElementSize -> String
$cshow :: ElementSize -> String
showsPrec :: Int -> ElementSize -> ShowS
$cshowsPrec :: Int -> ElementSize -> ShowS
Std_.Show
,ReadPrec [ElementSize]
ReadPrec ElementSize
Int -> ReadS ElementSize
ReadS [ElementSize]
(Int -> ReadS ElementSize)
-> ReadS [ElementSize]
-> ReadPrec ElementSize
-> ReadPrec [ElementSize]
-> Read ElementSize
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElementSize]
$creadListPrec :: ReadPrec [ElementSize]
readPrec :: ReadPrec ElementSize
$creadPrec :: ReadPrec ElementSize
readList :: ReadS [ElementSize]
$creadList :: ReadS [ElementSize]
readsPrec :: Int -> ReadS ElementSize
$creadsPrec :: Int -> ReadS ElementSize
Std_.Read
,ElementSize -> ElementSize -> Bool
(ElementSize -> ElementSize -> Bool)
-> (ElementSize -> ElementSize -> Bool) -> Eq ElementSize
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElementSize -> ElementSize -> Bool
$c/= :: ElementSize -> ElementSize -> Bool
== :: ElementSize -> ElementSize -> Bool
$c== :: ElementSize -> ElementSize -> Bool
Std_.Eq
,(forall x. ElementSize -> Rep ElementSize x)
-> (forall x. Rep ElementSize x -> ElementSize)
-> Generic ElementSize
forall x. Rep ElementSize x -> ElementSize
forall x. ElementSize -> Rep ElementSize x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ElementSize x -> ElementSize
$cfrom :: forall x. ElementSize -> Rep ElementSize x
Generics.Generic)
instance (Classes.IsWord ElementSize) where
fromWord :: Word64 -> ElementSize
fromWord Word64
n = case ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word64
n) :: Std_.Word16) of
Word16
0 ->
ElementSize
ElementSize'empty
Word16
1 ->
ElementSize
ElementSize'bit
Word16
2 ->
ElementSize
ElementSize'byte
Word16
3 ->
ElementSize
ElementSize'twoBytes
Word16
4 ->
ElementSize
ElementSize'fourBytes
Word16
5 ->
ElementSize
ElementSize'eightBytes
Word16
6 ->
ElementSize
ElementSize'pointer
Word16
7 ->
ElementSize
ElementSize'inlineComposite
Word16
tag ->
(Word16 -> ElementSize
ElementSize'unknown' Word16
tag)
toWord :: ElementSize -> Word64
toWord (ElementSize
ElementSize'empty) = Word64
0
toWord (ElementSize
ElementSize'bit) = Word64
1
toWord (ElementSize
ElementSize'byte) = Word64
2
toWord (ElementSize
ElementSize'twoBytes) = Word64
3
toWord (ElementSize
ElementSize'fourBytes) = Word64
4
toWord (ElementSize
ElementSize'eightBytes) = Word64
5
toWord (ElementSize
ElementSize'pointer) = Word64
6
toWord (ElementSize
ElementSize'inlineComposite) = Word64
7
toWord (ElementSize'unknown' Word16
tag) = (Word16 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Word16
tag)
instance (Std_.Enum ElementSize) where
fromEnum :: ElementSize -> Int
fromEnum ElementSize
x = (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (ElementSize -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord ElementSize
x))
toEnum :: Int -> ElementSize
toEnum Int
x = (Word64 -> ElementSize
forall a. IsWord a => Word64 -> a
Classes.fromWord (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral Int
x))
instance (Basics.ListElem mut ElementSize) where
newtype List mut ElementSize
= ElementSize'List_ (Untyped.ListOf mut Std_.Word16)
index :: Int -> List mut ElementSize -> m ElementSize
index Int
i (ElementSize'List_ l) = (Word64 -> ElementSize
forall a. IsWord a => Word64 -> a
Classes.fromWord (Word64 -> ElementSize) -> m Word64 -> m ElementSize
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Word16 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64) -> m Word16 -> m Word64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> ListOf mut Word16 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut Word16
l)))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut ElementSize)
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut Word16 -> List mut ElementSize
forall (mut :: Mutability).
ListOf mut Word16 -> List mut ElementSize
ElementSize'List_ (ListOf mut Word16 -> List mut ElementSize)
-> m (ListOf mut Word16) -> m (List mut ElementSize)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut Word16)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut ElementSize -> List mut
toUntypedList (ElementSize'List_ l) = (ListOf mut Word16 -> List mut
forall (mut :: Mutability). ListOf mut Word16 -> List mut
Untyped.List16 ListOf mut Word16
l)
length :: List mut ElementSize -> Int
length (ElementSize'List_ l) = (ListOf mut Word16 -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut Word16
l)
instance (Classes.MutListElem s ElementSize) where
setIndex :: ElementSize -> Int -> List ('Mut s) ElementSize -> m ()
setIndex ElementSize
elt Int
i (ElementSize'List_ l) = (Word16 -> Int -> ListOf ('Mut s) Word16 -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex (Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (ElementSize -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord ElementSize
elt)) Int
i ListOf ('Mut s) Word16
l)
newList :: Message ('Mut s) -> Int -> m (List ('Mut s) ElementSize)
newList Message ('Mut s)
msg Int
size = (ListOf ('Mut s) Word16 -> List ('Mut s) ElementSize
forall (mut :: Mutability).
ListOf mut Word16 -> List mut ElementSize
ElementSize'List_ (ListOf ('Mut s) Word16 -> List ('Mut s) ElementSize)
-> m (ListOf ('Mut s) Word16) -> m (List ('Mut s) ElementSize)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Int -> m (ListOf ('Mut s) Word16)
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (ListOf ('Mut s) Word16)
Untyped.allocList16 Message ('Mut s)
msg Int
size))
newtype CapnpVersion msg
= CapnpVersion'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (CapnpVersion msg)) where
fromStruct :: Struct msg -> m (CapnpVersion msg)
fromStruct Struct msg
struct = (CapnpVersion msg -> m (CapnpVersion msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> CapnpVersion msg
forall (msg :: Mutability). Struct msg -> CapnpVersion msg
CapnpVersion'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (CapnpVersion msg)) where
toStruct :: CapnpVersion msg -> Struct msg
toStruct (CapnpVersion'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (CapnpVersion mut) mut) where
message :: CapnpVersion mut -> Message mut
message (CapnpVersion'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (CapnpVersion mut) mut) where
messageDefault :: Message mut -> m (CapnpVersion mut)
messageDefault Message mut
msg = (Struct mut -> CapnpVersion mut
forall (msg :: Mutability). Struct msg -> CapnpVersion msg
CapnpVersion'newtype_ (Struct mut -> CapnpVersion mut)
-> m (Struct mut) -> m (CapnpVersion mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (CapnpVersion msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (CapnpVersion msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> CapnpVersion msg
forall (msg :: Mutability). Struct msg -> CapnpVersion msg
CapnpVersion'newtype_ (Struct msg -> CapnpVersion msg)
-> m (Struct msg) -> m (CapnpVersion msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (CapnpVersion (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> CapnpVersion ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (CapnpVersion'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (CapnpVersion (Message.Mut s))) where
new :: Message ('Mut s) -> m (CapnpVersion ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> CapnpVersion ('Mut s)
forall (msg :: Mutability). Struct msg -> CapnpVersion msg
CapnpVersion'newtype_ (Struct ('Mut s) -> CapnpVersion ('Mut s))
-> m (Struct ('Mut s)) -> m (CapnpVersion ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
0))
instance (Basics.ListElem mut (CapnpVersion mut)) where
newtype List mut (CapnpVersion mut)
= CapnpVersion'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut -> Maybe (Ptr mut) -> m (List mut (CapnpVersion mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (CapnpVersion mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (CapnpVersion mut)
CapnpVersion'List_ (ListOf mut (Struct mut) -> List mut (CapnpVersion mut))
-> m (ListOf mut (Struct mut)) -> m (List mut (CapnpVersion mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (CapnpVersion mut) -> List mut
toUntypedList (CapnpVersion'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (CapnpVersion mut) -> Int
length (CapnpVersion'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int -> List mut (CapnpVersion mut) -> m (CapnpVersion mut)
index Int
i (CapnpVersion'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (CapnpVersion mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (CapnpVersion (Message.Mut s))) where
setIndex :: CapnpVersion ('Mut s)
-> Int -> List ('Mut s) (CapnpVersion ('Mut s)) -> m ()
setIndex (CapnpVersion'newtype_ Struct ('Mut s)
elt) Int
i (CapnpVersion'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (CapnpVersion ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (CapnpVersion ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (CapnpVersion mut)
CapnpVersion'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (CapnpVersion ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (CapnpVersion ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
0 Int
len))
get_CapnpVersion'major :: ((Untyped.ReadCtx m msg)) => (CapnpVersion msg) -> (m Std_.Word16)
get_CapnpVersion'major :: CapnpVersion msg -> m Word16
get_CapnpVersion'major (CapnpVersion'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word16
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_CapnpVersion'major :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.Mut s)) -> Std_.Word16 -> (m ())
set_CapnpVersion'major :: CapnpVersion ('Mut s) -> Word16 -> m ()
set_CapnpVersion'major (CapnpVersion'newtype_ Struct ('Mut s)
struct) Word16
value = (Struct ('Mut s) -> Word16 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word16
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word16 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word16
value)) :: Std_.Word16) Int
0 Int
0 Word64
0)
get_CapnpVersion'minor :: ((Untyped.ReadCtx m msg)) => (CapnpVersion msg) -> (m Std_.Word8)
get_CapnpVersion'minor :: CapnpVersion msg -> m Word8
get_CapnpVersion'minor (CapnpVersion'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word8
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
16 Word64
0)
set_CapnpVersion'minor :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.Mut s)) -> Std_.Word8 -> (m ())
set_CapnpVersion'minor :: CapnpVersion ('Mut s) -> Word8 -> m ()
set_CapnpVersion'minor (CapnpVersion'newtype_ Struct ('Mut s)
struct) Word8
value = (Struct ('Mut s) -> Word8 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word8
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word8 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word8
value)) :: Std_.Word8) Int
0 Int
16 Word64
0)
get_CapnpVersion'micro :: ((Untyped.ReadCtx m msg)) => (CapnpVersion msg) -> (m Std_.Word8)
get_CapnpVersion'micro :: CapnpVersion msg -> m Word8
get_CapnpVersion'micro (CapnpVersion'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word8
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
24 Word64
0)
set_CapnpVersion'micro :: ((Untyped.RWCtx m s)) => (CapnpVersion (Message.Mut s)) -> Std_.Word8 -> (m ())
set_CapnpVersion'micro :: CapnpVersion ('Mut s) -> Word8 -> m ()
set_CapnpVersion'micro (CapnpVersion'newtype_ Struct ('Mut s)
struct) Word8
value = (Struct ('Mut s) -> Word8 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word8
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word8 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word8
value)) :: Std_.Word8) Int
0 Int
24 Word64
0)
newtype CodeGeneratorRequest msg
= CodeGeneratorRequest'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (CodeGeneratorRequest msg)) where
fromStruct :: Struct msg -> m (CodeGeneratorRequest msg)
fromStruct Struct msg
struct = (CodeGeneratorRequest msg -> m (CodeGeneratorRequest msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> CodeGeneratorRequest msg
forall (msg :: Mutability). Struct msg -> CodeGeneratorRequest msg
CodeGeneratorRequest'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (CodeGeneratorRequest msg)) where
toStruct :: CodeGeneratorRequest msg -> Struct msg
toStruct (CodeGeneratorRequest'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (CodeGeneratorRequest mut) mut) where
message :: CodeGeneratorRequest mut -> Message mut
message (CodeGeneratorRequest'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (CodeGeneratorRequest mut) mut) where
messageDefault :: Message mut -> m (CodeGeneratorRequest mut)
messageDefault Message mut
msg = (Struct mut -> CodeGeneratorRequest mut
forall (msg :: Mutability). Struct msg -> CodeGeneratorRequest msg
CodeGeneratorRequest'newtype_ (Struct mut -> CodeGeneratorRequest mut)
-> m (Struct mut) -> m (CodeGeneratorRequest mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (CodeGeneratorRequest msg)) where
fromPtr :: Message msg -> Maybe (Ptr msg) -> m (CodeGeneratorRequest msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> CodeGeneratorRequest msg
forall (msg :: Mutability). Struct msg -> CodeGeneratorRequest msg
CodeGeneratorRequest'newtype_ (Struct msg -> CodeGeneratorRequest msg)
-> m (Struct msg) -> m (CodeGeneratorRequest msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (CodeGeneratorRequest (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> CodeGeneratorRequest ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (CodeGeneratorRequest'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (CodeGeneratorRequest (Message.Mut s))) where
new :: Message ('Mut s) -> m (CodeGeneratorRequest ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> CodeGeneratorRequest ('Mut s)
forall (msg :: Mutability). Struct msg -> CodeGeneratorRequest msg
CodeGeneratorRequest'newtype_ (Struct ('Mut s) -> CodeGeneratorRequest ('Mut s))
-> m (Struct ('Mut s)) -> m (CodeGeneratorRequest ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
0 Word16
4))
instance (Basics.ListElem mut (CodeGeneratorRequest mut)) where
newtype List mut (CodeGeneratorRequest mut)
= CodeGeneratorRequest'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut
-> Maybe (Ptr mut) -> m (List mut (CodeGeneratorRequest mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut) -> List mut (CodeGeneratorRequest mut)
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (CodeGeneratorRequest mut)
CodeGeneratorRequest'List_ (ListOf mut (Struct mut) -> List mut (CodeGeneratorRequest mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (CodeGeneratorRequest mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (CodeGeneratorRequest mut) -> List mut
toUntypedList (CodeGeneratorRequest'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (CodeGeneratorRequest mut) -> Int
length (CodeGeneratorRequest'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int
-> List mut (CodeGeneratorRequest mut)
-> m (CodeGeneratorRequest mut)
index Int
i (CodeGeneratorRequest'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (CodeGeneratorRequest mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (CodeGeneratorRequest (Message.Mut s))) where
setIndex :: CodeGeneratorRequest ('Mut s)
-> Int -> List ('Mut s) (CodeGeneratorRequest ('Mut s)) -> m ()
setIndex (CodeGeneratorRequest'newtype_ Struct ('Mut s)
elt) Int
i (CodeGeneratorRequest'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int -> m (List ('Mut s) (CodeGeneratorRequest ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (CodeGeneratorRequest ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut) -> List mut (CodeGeneratorRequest mut)
CodeGeneratorRequest'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (CodeGeneratorRequest ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (CodeGeneratorRequest ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
0 Word16
4 Int
len))
get_CodeGeneratorRequest'nodes :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Node msg)))) => (CodeGeneratorRequest msg) -> (m (Basics.List msg (Node msg)))
get_CodeGeneratorRequest'nodes :: CodeGeneratorRequest msg -> m (List msg (Node msg))
get_CodeGeneratorRequest'nodes (CodeGeneratorRequest'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (List msg (Node msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'nodes :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node (Message.Mut s))))) => (CodeGeneratorRequest (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node (Message.Mut s))) -> (m ())
set_CodeGeneratorRequest'nodes :: CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (Node ('Mut s)) -> m ()
set_CodeGeneratorRequest'nodes (CodeGeneratorRequest'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Node ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Node ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Node ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'nodes :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'nodes :: CodeGeneratorRequest msg -> m Bool
has_CodeGeneratorRequest'nodes (CodeGeneratorRequest'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_CodeGeneratorRequest'nodes :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node (Message.Mut s))))
new_CodeGeneratorRequest'nodes :: Int
-> CodeGeneratorRequest ('Mut s)
-> m (List ('Mut s) (Node ('Mut s)))
new_CodeGeneratorRequest'nodes Int
len CodeGeneratorRequest ('Mut s)
struct = (do
List ('Mut s) (Node ('Mut s))
result <- (Message ('Mut s) -> Int -> m (List ('Mut s) (Node ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (CodeGeneratorRequest ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest ('Mut s)
struct) Int
len)
(CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (Node ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Node ('Mut s)))) =>
CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (Node ('Mut s)) -> m ()
set_CodeGeneratorRequest'nodes CodeGeneratorRequest ('Mut s)
struct List ('Mut s) (Node ('Mut s))
result)
(List ('Mut s) (Node ('Mut s)) -> m (List ('Mut s) (Node ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Node ('Mut s))
result)
)
get_CodeGeneratorRequest'requestedFiles :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (CodeGeneratorRequest'RequestedFile msg)))) => (CodeGeneratorRequest msg) -> (m (Basics.List msg (CodeGeneratorRequest'RequestedFile msg)))
get_CodeGeneratorRequest'requestedFiles :: CodeGeneratorRequest msg
-> m (List msg (CodeGeneratorRequest'RequestedFile msg))
get_CodeGeneratorRequest'requestedFiles (CodeGeneratorRequest'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg
-> Maybe (Ptr msg)
-> m (List msg (CodeGeneratorRequest'RequestedFile msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'requestedFiles :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile (Message.Mut s))))) => (CodeGeneratorRequest (Message.Mut s)) -> (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile (Message.Mut s))) -> (m ())
set_CodeGeneratorRequest'requestedFiles :: CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
-> m ()
set_CodeGeneratorRequest'requestedFiles (CodeGeneratorRequest'newtype_ Struct ('Mut s)
struct) List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'requestedFiles :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'requestedFiles :: CodeGeneratorRequest msg -> m Bool
has_CodeGeneratorRequest'requestedFiles (CodeGeneratorRequest'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_CodeGeneratorRequest'requestedFiles :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile (Message.Mut s))))
new_CodeGeneratorRequest'requestedFiles :: Int
-> CodeGeneratorRequest ('Mut s)
-> m (List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))
new_CodeGeneratorRequest'requestedFiles Int
len CodeGeneratorRequest ('Mut s)
struct = (do
List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
result <- (Message ('Mut s)
-> Int
-> m (List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (CodeGeneratorRequest ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest ('Mut s)
struct) Int
len)
(CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
-> m ()
forall (m :: * -> *) s.
(RWCtx m s,
ToPtr
s (List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))) =>
CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
-> m ()
set_CodeGeneratorRequest'requestedFiles CodeGeneratorRequest ('Mut s)
struct List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
result)
(List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
-> m (List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
result)
)
get_CodeGeneratorRequest'capnpVersion :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (CapnpVersion msg))) => (CodeGeneratorRequest msg) -> (m (CapnpVersion msg))
get_CodeGeneratorRequest'capnpVersion :: CodeGeneratorRequest msg -> m (CapnpVersion msg)
get_CodeGeneratorRequest'capnpVersion (CodeGeneratorRequest'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (CapnpVersion msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'capnpVersion :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (CapnpVersion (Message.Mut s)))) => (CodeGeneratorRequest (Message.Mut s)) -> (CapnpVersion (Message.Mut s)) -> (m ())
set_CodeGeneratorRequest'capnpVersion :: CodeGeneratorRequest ('Mut s) -> CapnpVersion ('Mut s) -> m ()
set_CodeGeneratorRequest'capnpVersion (CodeGeneratorRequest'newtype_ Struct ('Mut s)
struct) CapnpVersion ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> CapnpVersion ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) CapnpVersion ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
2 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'capnpVersion :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'capnpVersion :: CodeGeneratorRequest msg -> m Bool
has_CodeGeneratorRequest'capnpVersion (CodeGeneratorRequest'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
2 Struct msg
struct))
new_CodeGeneratorRequest'capnpVersion :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest (Message.Mut s)) -> (m (CapnpVersion (Message.Mut s)))
new_CodeGeneratorRequest'capnpVersion :: CodeGeneratorRequest ('Mut s) -> m (CapnpVersion ('Mut s))
new_CodeGeneratorRequest'capnpVersion CodeGeneratorRequest ('Mut s)
struct = (do
CapnpVersion ('Mut s)
result <- (Message ('Mut s) -> m (CapnpVersion ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (CodeGeneratorRequest ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest ('Mut s)
struct))
(CodeGeneratorRequest ('Mut s) -> CapnpVersion ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (CapnpVersion ('Mut s))) =>
CodeGeneratorRequest ('Mut s) -> CapnpVersion ('Mut s) -> m ()
set_CodeGeneratorRequest'capnpVersion CodeGeneratorRequest ('Mut s)
struct CapnpVersion ('Mut s)
result)
(CapnpVersion ('Mut s) -> m (CapnpVersion ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure CapnpVersion ('Mut s)
result)
)
get_CodeGeneratorRequest'sourceInfo :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (Node'SourceInfo msg)))) => (CodeGeneratorRequest msg) -> (m (Basics.List msg (Node'SourceInfo msg)))
get_CodeGeneratorRequest'sourceInfo :: CodeGeneratorRequest msg -> m (List msg (Node'SourceInfo msg))
get_CodeGeneratorRequest'sourceInfo (CodeGeneratorRequest'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct)
(Message msg
-> Maybe (Ptr msg) -> m (List msg (Node'SourceInfo msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'sourceInfo :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (Node'SourceInfo (Message.Mut s))))) => (CodeGeneratorRequest (Message.Mut s)) -> (Basics.List (Message.Mut s) (Node'SourceInfo (Message.Mut s))) -> (m ())
set_CodeGeneratorRequest'sourceInfo :: CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (Node'SourceInfo ('Mut s)) -> m ()
set_CodeGeneratorRequest'sourceInfo (CodeGeneratorRequest'newtype_ Struct ('Mut s)
struct) List ('Mut s) (Node'SourceInfo ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List ('Mut s) (Node'SourceInfo ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (Node'SourceInfo ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
3 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'sourceInfo :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'sourceInfo :: CodeGeneratorRequest msg -> m Bool
has_CodeGeneratorRequest'sourceInfo (CodeGeneratorRequest'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
3 Struct msg
struct))
new_CodeGeneratorRequest'sourceInfo :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (Node'SourceInfo (Message.Mut s))))
new_CodeGeneratorRequest'sourceInfo :: Int
-> CodeGeneratorRequest ('Mut s)
-> m (List ('Mut s) (Node'SourceInfo ('Mut s)))
new_CodeGeneratorRequest'sourceInfo Int
len CodeGeneratorRequest ('Mut s)
struct = (do
List ('Mut s) (Node'SourceInfo ('Mut s))
result <- (Message ('Mut s)
-> Int -> m (List ('Mut s) (Node'SourceInfo ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (CodeGeneratorRequest ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest ('Mut s)
struct) Int
len)
(CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (Node'SourceInfo ('Mut s)) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (List ('Mut s) (Node'SourceInfo ('Mut s)))) =>
CodeGeneratorRequest ('Mut s)
-> List ('Mut s) (Node'SourceInfo ('Mut s)) -> m ()
set_CodeGeneratorRequest'sourceInfo CodeGeneratorRequest ('Mut s)
struct List ('Mut s) (Node'SourceInfo ('Mut s))
result)
(List ('Mut s) (Node'SourceInfo ('Mut s))
-> m (List ('Mut s) (Node'SourceInfo ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (Node'SourceInfo ('Mut s))
result)
)
newtype CodeGeneratorRequest'RequestedFile msg
= CodeGeneratorRequest'RequestedFile'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (CodeGeneratorRequest'RequestedFile msg)) where
fromStruct :: Struct msg -> m (CodeGeneratorRequest'RequestedFile msg)
fromStruct Struct msg
struct = (CodeGeneratorRequest'RequestedFile msg
-> m (CodeGeneratorRequest'RequestedFile msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> CodeGeneratorRequest'RequestedFile msg
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile msg
CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (CodeGeneratorRequest'RequestedFile msg)) where
toStruct :: CodeGeneratorRequest'RequestedFile msg -> Struct msg
toStruct (CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (CodeGeneratorRequest'RequestedFile mut) mut) where
message :: CodeGeneratorRequest'RequestedFile mut -> Message mut
message (CodeGeneratorRequest'RequestedFile'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (CodeGeneratorRequest'RequestedFile mut) mut) where
messageDefault :: Message mut -> m (CodeGeneratorRequest'RequestedFile mut)
messageDefault Message mut
msg = (Struct mut -> CodeGeneratorRequest'RequestedFile mut
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile msg
CodeGeneratorRequest'RequestedFile'newtype_ (Struct mut -> CodeGeneratorRequest'RequestedFile mut)
-> m (Struct mut) -> m (CodeGeneratorRequest'RequestedFile mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (CodeGeneratorRequest'RequestedFile msg)) where
fromPtr :: Message msg
-> Maybe (Ptr msg) -> m (CodeGeneratorRequest'RequestedFile msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> CodeGeneratorRequest'RequestedFile msg
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile msg
CodeGeneratorRequest'RequestedFile'newtype_ (Struct msg -> CodeGeneratorRequest'RequestedFile msg)
-> m (Struct msg) -> m (CodeGeneratorRequest'RequestedFile msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (CodeGeneratorRequest'RequestedFile (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> CodeGeneratorRequest'RequestedFile ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (CodeGeneratorRequest'RequestedFile'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (CodeGeneratorRequest'RequestedFile (Message.Mut s))) where
new :: Message ('Mut s) -> m (CodeGeneratorRequest'RequestedFile ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> CodeGeneratorRequest'RequestedFile ('Mut s)
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile msg
CodeGeneratorRequest'RequestedFile'newtype_ (Struct ('Mut s) -> CodeGeneratorRequest'RequestedFile ('Mut s))
-> m (Struct ('Mut s))
-> m (CodeGeneratorRequest'RequestedFile ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
2))
instance (Basics.ListElem mut (CodeGeneratorRequest'RequestedFile mut)) where
newtype List mut (CodeGeneratorRequest'RequestedFile mut)
= CodeGeneratorRequest'RequestedFile'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut
-> Maybe (Ptr mut)
-> m (List mut (CodeGeneratorRequest'RequestedFile mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile mut)
forall (mut :: Mutability).
ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile mut)
CodeGeneratorRequest'RequestedFile'List_ (ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (CodeGeneratorRequest'RequestedFile mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (CodeGeneratorRequest'RequestedFile mut) -> List mut
toUntypedList (CodeGeneratorRequest'RequestedFile'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (CodeGeneratorRequest'RequestedFile mut) -> Int
length (CodeGeneratorRequest'RequestedFile'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int
-> List mut (CodeGeneratorRequest'RequestedFile mut)
-> m (CodeGeneratorRequest'RequestedFile mut)
index Int
i (CodeGeneratorRequest'RequestedFile'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (CodeGeneratorRequest'RequestedFile mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (CodeGeneratorRequest'RequestedFile (Message.Mut s))) where
setIndex :: CodeGeneratorRequest'RequestedFile ('Mut s)
-> Int
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
-> m ()
setIndex (CodeGeneratorRequest'RequestedFile'newtype_ Struct ('Mut s)
elt) Int
i (CodeGeneratorRequest'RequestedFile'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int
-> m (List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile mut)
CodeGeneratorRequest'RequestedFile'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List ('Mut s) (CodeGeneratorRequest'RequestedFile ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
2 Int
len))
get_CodeGeneratorRequest'RequestedFile'id :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile msg) -> (m Std_.Word64)
get_CodeGeneratorRequest'RequestedFile'id :: CodeGeneratorRequest'RequestedFile msg -> m Word64
get_CodeGeneratorRequest'RequestedFile'id (CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_CodeGeneratorRequest'RequestedFile'id :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> Std_.Word64 -> (m ())
set_CodeGeneratorRequest'RequestedFile'id :: CodeGeneratorRequest'RequestedFile ('Mut s) -> Word64 -> m ()
set_CodeGeneratorRequest'RequestedFile'id (CodeGeneratorRequest'RequestedFile'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
get_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (CodeGeneratorRequest'RequestedFile msg) -> (m (Basics.Text msg))
get_CodeGeneratorRequest'RequestedFile'filename :: CodeGeneratorRequest'RequestedFile msg -> m (Text msg)
get_CodeGeneratorRequest'RequestedFile'filename (CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_CodeGeneratorRequest'RequestedFile'filename :: CodeGeneratorRequest'RequestedFile ('Mut s)
-> Text ('Mut s) -> m ()
set_CodeGeneratorRequest'RequestedFile'filename (CodeGeneratorRequest'RequestedFile'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'RequestedFile'filename :: CodeGeneratorRequest'RequestedFile msg -> m Bool
has_CodeGeneratorRequest'RequestedFile'filename (CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_CodeGeneratorRequest'RequestedFile'filename :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_CodeGeneratorRequest'RequestedFile'filename :: Int
-> CodeGeneratorRequest'RequestedFile ('Mut s) -> m (Text ('Mut s))
new_CodeGeneratorRequest'RequestedFile'filename Int
len CodeGeneratorRequest'RequestedFile ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (CodeGeneratorRequest'RequestedFile ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest'RequestedFile ('Mut s)
struct) Int
len)
(CodeGeneratorRequest'RequestedFile ('Mut s)
-> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
CodeGeneratorRequest'RequestedFile ('Mut s)
-> Text ('Mut s) -> m ()
set_CodeGeneratorRequest'RequestedFile'filename CodeGeneratorRequest'RequestedFile ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)
get_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.List msg (CodeGeneratorRequest'RequestedFile'Import msg)))) => (CodeGeneratorRequest'RequestedFile msg) -> (m (Basics.List msg (CodeGeneratorRequest'RequestedFile'Import msg)))
get_CodeGeneratorRequest'RequestedFile'imports :: CodeGeneratorRequest'RequestedFile msg
-> m (List msg (CodeGeneratorRequest'RequestedFile'Import msg))
get_CodeGeneratorRequest'RequestedFile'imports (CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
(Message msg
-> Maybe (Ptr msg)
-> m (List msg (CodeGeneratorRequest'RequestedFile'Import msg))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))))) => (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) -> (m ())
set_CodeGeneratorRequest'RequestedFile'imports :: CodeGeneratorRequest'RequestedFile ('Mut s)
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m ()
set_CodeGeneratorRequest'RequestedFile'imports (CodeGeneratorRequest'RequestedFile'newtype_ Struct ('Mut s)
struct) List ('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) List ('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
1 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'RequestedFile'imports :: CodeGeneratorRequest'RequestedFile msg -> m Bool
has_CodeGeneratorRequest'RequestedFile'imports (CodeGeneratorRequest'RequestedFile'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_CodeGeneratorRequest'RequestedFile'imports :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile (Message.Mut s)) -> (m (Basics.List (Message.Mut s) (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))))
new_CodeGeneratorRequest'RequestedFile'imports :: Int
-> CodeGeneratorRequest'RequestedFile ('Mut s)
-> m (List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))
new_CodeGeneratorRequest'RequestedFile'imports Int
len CodeGeneratorRequest'RequestedFile ('Mut s)
struct = (do
List ('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
result <- (Message ('Mut s)
-> Int
-> m (List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))
forall s e (m :: * -> *).
(MutListElem s e, WriteCtx m s) =>
Message ('Mut s) -> Int -> m (List ('Mut s) e)
Classes.newList (CodeGeneratorRequest'RequestedFile ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest'RequestedFile ('Mut s)
struct) Int
len)
(CodeGeneratorRequest'RequestedFile ('Mut s)
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m ()
forall (m :: * -> *) s.
(RWCtx m s,
ToPtr
s
(List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))) =>
CodeGeneratorRequest'RequestedFile ('Mut s)
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m ()
set_CodeGeneratorRequest'RequestedFile'imports CodeGeneratorRequest'RequestedFile ('Mut s)
struct List ('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
result)
(List ('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m (List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure List ('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
result)
)
newtype CodeGeneratorRequest'RequestedFile'Import msg
= CodeGeneratorRequest'RequestedFile'Import'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (CodeGeneratorRequest'RequestedFile'Import msg)) where
fromStruct :: Struct msg -> m (CodeGeneratorRequest'RequestedFile'Import msg)
fromStruct Struct msg
struct = (CodeGeneratorRequest'RequestedFile'Import msg
-> m (CodeGeneratorRequest'RequestedFile'Import msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg
CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (CodeGeneratorRequest'RequestedFile'Import msg)) where
toStruct :: CodeGeneratorRequest'RequestedFile'Import msg -> Struct msg
toStruct (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (CodeGeneratorRequest'RequestedFile'Import mut) mut) where
message :: CodeGeneratorRequest'RequestedFile'Import mut -> Message mut
message (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct mut
struct) = (Struct mut -> Message mut
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct mut
struct)
instance (Untyped.MessageDefault (CodeGeneratorRequest'RequestedFile'Import mut) mut) where
messageDefault :: Message mut -> m (CodeGeneratorRequest'RequestedFile'Import mut)
messageDefault Message mut
msg = (Struct mut -> CodeGeneratorRequest'RequestedFile'Import mut
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg
CodeGeneratorRequest'RequestedFile'Import'newtype_ (Struct mut -> CodeGeneratorRequest'RequestedFile'Import mut)
-> m (Struct mut)
-> m (CodeGeneratorRequest'RequestedFile'Import mut)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> m (Struct mut)
forall a (mut :: Mutability) (m :: * -> *).
(MessageDefault a mut, ReadCtx m mut) =>
Message mut -> m a
Untyped.messageDefault Message mut
msg))
instance (Classes.FromPtr msg (CodeGeneratorRequest'RequestedFile'Import msg)) where
fromPtr :: Message msg
-> Maybe (Ptr msg)
-> m (CodeGeneratorRequest'RequestedFile'Import msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg
CodeGeneratorRequest'RequestedFile'Import'newtype_ (Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg)
-> m (Struct msg)
-> m (CodeGeneratorRequest'RequestedFile'Import msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message msg -> Maybe (Ptr msg) -> m (Struct msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) where
toPtr :: Message ('Mut s)
-> CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct ('Mut s)
struct) = (Message ('Mut s) -> Struct ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr Message ('Mut s)
msg Struct ('Mut s)
struct)
instance (Classes.Allocate s (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) where
new :: Message ('Mut s)
-> m (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s)
-> CodeGeneratorRequest'RequestedFile'Import ('Mut s)
forall (msg :: Mutability).
Struct msg -> CodeGeneratorRequest'RequestedFile'Import msg
CodeGeneratorRequest'RequestedFile'Import'newtype_ (Struct ('Mut s)
-> CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m (Struct ('Mut s))
-> m (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Word16 -> Word16 -> m (Struct ('Mut s))
Untyped.allocStruct Message ('Mut s)
msg Word16
1 Word16
1))
instance (Basics.ListElem mut (CodeGeneratorRequest'RequestedFile'Import mut)) where
newtype List mut (CodeGeneratorRequest'RequestedFile'Import mut)
= CodeGeneratorRequest'RequestedFile'Import'List_ (Untyped.ListOf mut (Untyped.Struct mut))
listFromPtr :: Message mut
-> Maybe (Ptr mut)
-> m (List mut (CodeGeneratorRequest'RequestedFile'Import mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile'Import mut)
forall (mut :: Mutability).
ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile'Import mut)
CodeGeneratorRequest'RequestedFile'Import'List_ (ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile'Import mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (CodeGeneratorRequest'RequestedFile'Import mut))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message mut -> Maybe (Ptr mut) -> m (ListOf mut (Struct mut))
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr Message mut
msg Maybe (Ptr mut)
ptr))
toUntypedList :: List mut (CodeGeneratorRequest'RequestedFile'Import mut)
-> List mut
toUntypedList (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (ListOf mut (Struct mut) -> List mut
forall (mut :: Mutability). ListOf mut (Struct mut) -> List mut
Untyped.ListStruct ListOf mut (Struct mut)
l)
length :: List mut (CodeGeneratorRequest'RequestedFile'Import mut) -> Int
length (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (ListOf mut (Struct mut) -> Int
forall (msg :: Mutability) a. ListOf msg a -> Int
Untyped.length ListOf mut (Struct mut)
l)
index :: Int
-> List mut (CodeGeneratorRequest'RequestedFile'Import mut)
-> m (CodeGeneratorRequest'RequestedFile'Import mut)
index Int
i (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (do
Struct mut
elt <- (Int -> ListOf mut (Struct mut) -> m (Struct mut)
forall (m :: * -> *) (mut :: Mutability) a.
ReadCtx m mut =>
Int -> ListOf mut a -> m a
Untyped.index Int
i ListOf mut (Struct mut)
l)
(Struct mut -> m (CodeGeneratorRequest'RequestedFile'Import mut)
forall (mut :: Mutability) a (m :: * -> *).
(FromStruct mut a, ReadCtx m mut) =>
Struct mut -> m a
Classes.fromStruct Struct mut
elt)
)
instance (Basics.MutListElem s (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s))) where
setIndex :: CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> Int
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
-> m ()
setIndex (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct ('Mut s)
elt) Int
i (CodeGeneratorRequest'RequestedFile'Import'List_ l) = (Struct ('Mut s) -> Int -> ListOf ('Mut s) (Struct ('Mut s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf ('Mut s) a -> m ()
Untyped.setIndex Struct ('Mut s)
elt Int
i ListOf ('Mut s) (Struct ('Mut s))
l)
newList :: Message ('Mut s)
-> Int
-> m (List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s))
forall (mut :: Mutability).
ListOf mut (Struct mut)
-> List mut (CodeGeneratorRequest'RequestedFile'Import mut)
CodeGeneratorRequest'RequestedFile'Import'List_ (ListOf ('Mut s) (Struct ('Mut s))
-> List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List
('Mut s) (CodeGeneratorRequest'RequestedFile'Import ('Mut s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s)
-> Word16 -> Word16 -> Int -> m (ListOf ('Mut s) (Struct ('Mut s)))
Untyped.allocCompositeList Message ('Mut s)
msg Word16
1 Word16
1 Int
len))
get_CodeGeneratorRequest'RequestedFile'Import'id :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile'Import msg) -> (m Std_.Word64)
get_CodeGeneratorRequest'RequestedFile'Import'id :: CodeGeneratorRequest'RequestedFile'Import msg -> m Word64
get_CodeGeneratorRequest'RequestedFile'Import'id (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct msg
struct) = (Struct msg -> Int -> Int -> Word64 -> m Word64
forall (m :: * -> *) (mut :: Mutability) a.
(ReadCtx m mut, IsWord a) =>
Struct mut -> Int -> Int -> Word64 -> m a
GenHelpers.getWordField Struct msg
struct Int
0 Int
0 Word64
0)
set_CodeGeneratorRequest'RequestedFile'Import'id :: ((Untyped.RWCtx m s)) => (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s)) -> Std_.Word64 -> (m ())
set_CodeGeneratorRequest'RequestedFile'Import'id :: CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> Word64 -> m ()
set_CodeGeneratorRequest'RequestedFile'Import'id (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct ('Mut s)
struct) Word64
value = (Struct ('Mut s) -> Word64 -> Int -> Int -> Word64 -> m ()
forall (m :: * -> *) s a.
(RWCtx m s, Bounded a, Integral a, IsWord a, Bits a) =>
Struct ('Mut s) -> a -> Int -> Int -> Word64 -> m ()
GenHelpers.setWordField Struct ('Mut s)
struct ((Word64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Std_.fromIntegral (Word64 -> Word64
forall a. IsWord a => a -> Word64
Classes.toWord Word64
value)) :: Std_.Word64) Int
0 Int
0 Word64
0)
get_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.ReadCtx m msg)
,(Classes.FromPtr msg (Basics.Text msg))) => (CodeGeneratorRequest'RequestedFile'Import msg) -> (m (Basics.Text msg))
get_CodeGeneratorRequest'RequestedFile'Import'name :: CodeGeneratorRequest'RequestedFile'Import msg -> m (Text msg)
get_CodeGeneratorRequest'RequestedFile'Import'name (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct msg
struct) = (do
Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
(Message msg -> Maybe (Ptr msg) -> m (Text msg)
forall (mut :: Mutability) a (m :: * -> *).
(FromPtr mut a, ReadCtx m mut) =>
Message mut -> Maybe (Ptr mut) -> m a
Classes.fromPtr (Struct msg -> Message msg
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
)
set_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.RWCtx m s)
,(Classes.ToPtr s (Basics.Text (Message.Mut s)))) => (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s)) -> (Basics.Text (Message.Mut s)) -> (m ())
set_CodeGeneratorRequest'RequestedFile'Import'name :: CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> Text ('Mut s) -> m ()
set_CodeGeneratorRequest'RequestedFile'Import'name (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct ('Mut s)
struct) Text ('Mut s)
value = (do
Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> Text ('Mut s) -> m (Maybe (Ptr ('Mut s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
Message ('Mut s) -> a -> m (Maybe (Ptr ('Mut s)))
Classes.toPtr (Struct ('Mut s) -> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message Struct ('Mut s)
struct) Text ('Mut s)
value)
(Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m ('Mut s), WriteCtx m s) =>
Maybe (Ptr ('Mut s)) -> Int -> Struct ('Mut s) -> m ()
Untyped.setPtr Maybe (Ptr ('Mut s))
ptr Int
0 Struct ('Mut s)
struct)
)
has_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.ReadCtx m msg)) => (CodeGeneratorRequest'RequestedFile'Import msg) -> (m Std_.Bool)
has_CodeGeneratorRequest'RequestedFile'Import'name :: CodeGeneratorRequest'RequestedFile'Import msg -> m Bool
has_CodeGeneratorRequest'RequestedFile'Import'name (CodeGeneratorRequest'RequestedFile'Import'newtype_ Struct msg
struct) = (Maybe (Ptr msg) -> Bool
forall a. Maybe a -> Bool
Std_.isJust (Maybe (Ptr msg) -> Bool) -> m (Maybe (Ptr msg)) -> m Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) (msg :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
new_CodeGeneratorRequest'RequestedFile'Import'name :: ((Untyped.RWCtx m s)) => Std_.Int -> (CodeGeneratorRequest'RequestedFile'Import (Message.Mut s)) -> (m (Basics.Text (Message.Mut s)))
new_CodeGeneratorRequest'RequestedFile'Import'name :: Int
-> CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> m (Text ('Mut s))
new_CodeGeneratorRequest'RequestedFile'Import'name Int
len CodeGeneratorRequest'RequestedFile'Import ('Mut s)
struct = (do
Text ('Mut s)
result <- (Message ('Mut s) -> Int -> m (Text ('Mut s))
forall (m :: * -> *) s.
WriteCtx m s =>
Message ('Mut s) -> Int -> m (Text ('Mut s))
Basics.newText (CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message CodeGeneratorRequest'RequestedFile'Import ('Mut s)
struct) Int
len)
(CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> Text ('Mut s) -> m ()
forall (m :: * -> *) s.
(RWCtx m s, ToPtr s (Text ('Mut s))) =>
CodeGeneratorRequest'RequestedFile'Import ('Mut s)
-> Text ('Mut s) -> m ()
set_CodeGeneratorRequest'RequestedFile'Import'name CodeGeneratorRequest'RequestedFile'Import ('Mut s)
struct Text ('Mut s)
result)
(Text ('Mut s) -> m (Text ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Text ('Mut s)
result)
)