{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-dodgy-exports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Capnp.Gen.Capnp.Persistent 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 Persistent sturdyRef owner msg
    = Persistent'newtype_ (Std_.Maybe (Untyped.Cap msg))
instance (Classes.FromPtr msg (Persistent sturdyRef owner msg)) where
    fromPtr :: msg -> Maybe (Ptr msg) -> m (Persistent sturdyRef owner msg)
fromPtr msg
msg Maybe (Ptr msg)
ptr = (Maybe (Cap msg) -> Persistent sturdyRef owner msg
forall sturdyRef owner msg.
Maybe (Cap msg) -> Persistent sturdyRef owner msg
Persistent'newtype_ (Maybe (Cap msg) -> Persistent sturdyRef owner msg)
-> m (Maybe (Cap msg)) -> m (Persistent sturdyRef owner msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (Maybe (Cap msg))
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Persistent sturdyRef owner (Message.MutMsg s))) where
    toPtr :: MutMsg s
-> Persistent sturdyRef owner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
toPtr MutMsg s
msg (Persistent'newtype_ (Maybe (Cap (MutMsg s))
Std_.Nothing)) = (Maybe (Ptr (MutMsg s)) -> m (Maybe (Ptr (MutMsg s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Maybe (Ptr (MutMsg s))
forall a. Maybe a
Std_.Nothing)
    toPtr MutMsg s
msg (Persistent'newtype_ (Std_.Just Cap (MutMsg s)
cap)) = (Maybe (Ptr (MutMsg s)) -> m (Maybe (Ptr (MutMsg s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Ptr (MutMsg s) -> Maybe (Ptr (MutMsg s))
forall a. a -> Maybe a
Std_.Just (Cap (MutMsg s) -> Ptr (MutMsg s)
forall msg. Cap msg -> Ptr msg
Untyped.PtrCap Cap (MutMsg s)
cap)))
newtype Persistent'SaveParams sturdyRef owner msg
    = Persistent'SaveParams'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Persistent'SaveParams sturdyRef owner msg)) where
    fromStruct :: Struct msg -> m (Persistent'SaveParams sturdyRef owner msg)
fromStruct Struct msg
struct = (Persistent'SaveParams sturdyRef owner msg
-> m (Persistent'SaveParams sturdyRef owner msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Persistent'SaveParams sturdyRef owner msg
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveParams sturdyRef owner msg
Persistent'SaveParams'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Persistent'SaveParams sturdyRef owner msg)) where
    toStruct :: Persistent'SaveParams sturdyRef owner msg -> Struct msg
toStruct (Persistent'SaveParams'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Persistent'SaveParams sturdyRef owner msg)) where
    type InMessage (Persistent'SaveParams sturdyRef owner msg) = msg
    message :: Persistent'SaveParams sturdyRef owner msg
-> InMessage (Persistent'SaveParams sturdyRef owner msg)
message (Persistent'SaveParams'newtype_ Struct msg
struct) = (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct)
instance (Untyped.MessageDefault (Persistent'SaveParams sturdyRef owner msg)) where
    messageDefault :: InMessage (Persistent'SaveParams sturdyRef owner msg)
-> Persistent'SaveParams sturdyRef owner msg
messageDefault InMessage (Persistent'SaveParams sturdyRef owner msg)
msg = (Struct msg -> Persistent'SaveParams sturdyRef owner msg
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveParams sturdyRef owner msg
Persistent'SaveParams'newtype_ (InMessage (Struct msg) -> Struct msg
forall a. MessageDefault a => InMessage a -> a
Untyped.messageDefault InMessage (Struct msg)
InMessage (Persistent'SaveParams sturdyRef owner msg)
msg))
instance (Classes.FromPtr msg (Persistent'SaveParams sturdyRef owner msg)) where
    fromPtr :: msg
-> Maybe (Ptr msg) -> m (Persistent'SaveParams sturdyRef owner msg)
fromPtr msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Persistent'SaveParams sturdyRef owner msg
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveParams sturdyRef owner msg
Persistent'SaveParams'newtype_ (Struct msg -> Persistent'SaveParams sturdyRef owner msg)
-> m (Struct msg) -> m (Persistent'SaveParams sturdyRef owner msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (Struct msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Persistent'SaveParams sturdyRef owner (Message.MutMsg s))) where
    toPtr :: MutMsg s
-> Persistent'SaveParams sturdyRef owner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
toPtr MutMsg s
msg (Persistent'SaveParams'newtype_ Struct (MutMsg s)
struct) = (MutMsg s -> Struct (MutMsg s) -> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr MutMsg s
msg Struct (MutMsg s)
struct)
instance (Classes.Allocate s (Persistent'SaveParams sturdyRef owner (Message.MutMsg s))) where
    new :: MutMsg s -> m (Persistent'SaveParams sturdyRef owner (MutMsg s))
new MutMsg s
msg = (Struct (MutMsg s)
-> Persistent'SaveParams sturdyRef owner (MutMsg s)
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveParams sturdyRef owner msg
Persistent'SaveParams'newtype_ (Struct (MutMsg s)
 -> Persistent'SaveParams sturdyRef owner (MutMsg s))
-> m (Struct (MutMsg s))
-> m (Persistent'SaveParams sturdyRef owner (MutMsg s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
Untyped.allocStruct MutMsg s
msg Word16
0 Word16
1))
instance (Basics.ListElem msg (Persistent'SaveParams sturdyRef owner msg)) where
    newtype List msg (Persistent'SaveParams sturdyRef owner msg)
        = Persistent'SaveParams'List_ (Untyped.ListOf msg (Untyped.Struct msg))
    listFromPtr :: msg
-> Maybe (Ptr msg)
-> m (List msg (Persistent'SaveParams sturdyRef owner msg))
listFromPtr msg
msg Maybe (Ptr msg)
ptr = (ListOf msg (Struct msg)
-> List msg (Persistent'SaveParams sturdyRef owner msg)
forall msg sturdyRef owner.
ListOf msg (Struct msg)
-> List msg (Persistent'SaveParams sturdyRef owner msg)
Persistent'SaveParams'List_ (ListOf msg (Struct msg)
 -> List msg (Persistent'SaveParams sturdyRef owner msg))
-> m (ListOf msg (Struct msg))
-> m (List msg (Persistent'SaveParams sturdyRef owner msg))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (ListOf msg (Struct msg))
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
    toUntypedList :: List msg (Persistent'SaveParams sturdyRef owner msg) -> List msg
toUntypedList (Persistent'SaveParams'List_ l) = (ListOf msg (Struct msg) -> List msg
forall msg. ListOf msg (Struct msg) -> List msg
Untyped.ListStruct ListOf msg (Struct msg)
l)
    length :: List msg (Persistent'SaveParams sturdyRef owner msg) -> Int
length (Persistent'SaveParams'List_ l) = (ListOf msg (Struct msg) -> Int
forall msg a. ListOf msg a -> Int
Untyped.length ListOf msg (Struct msg)
l)
    index :: Int
-> List msg (Persistent'SaveParams sturdyRef owner msg)
-> m (Persistent'SaveParams sturdyRef owner msg)
index Int
i (Persistent'SaveParams'List_ l) = (do
        Struct msg
elt <- (Int -> ListOf msg (Struct msg) -> m (Struct msg)
forall (m :: * -> *) msg a.
ReadCtx m msg =>
Int -> ListOf msg a -> m a
Untyped.index Int
i ListOf msg (Struct msg)
l)
        (Struct msg -> m (Persistent'SaveParams sturdyRef owner msg)
forall msg a (m :: * -> *).
(FromStruct msg a, ReadCtx m msg) =>
Struct msg -> m a
Classes.fromStruct Struct msg
elt)
        )
instance (Basics.MutListElem s (Persistent'SaveParams sturdyRef owner (Message.MutMsg s))) where
    setIndex :: Persistent'SaveParams sturdyRef owner (MutMsg s)
-> Int
-> List
     (MutMsg s) (Persistent'SaveParams sturdyRef owner (MutMsg s))
-> m ()
setIndex (Persistent'SaveParams'newtype_ Struct (MutMsg s)
elt) Int
i (Persistent'SaveParams'List_ l) = (Struct (MutMsg s)
-> Int -> ListOf (MutMsg s) (Struct (MutMsg s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf (MutMsg s) a -> m ()
Untyped.setIndex Struct (MutMsg s)
elt Int
i ListOf (MutMsg s) (Struct (MutMsg s))
l)
    newList :: MutMsg s
-> Int
-> m (List
        (MutMsg s) (Persistent'SaveParams sturdyRef owner (MutMsg s)))
newList MutMsg s
msg Int
len = (ListOf (MutMsg s) (Struct (MutMsg s))
-> List
     (MutMsg s) (Persistent'SaveParams sturdyRef owner (MutMsg s))
forall msg sturdyRef owner.
ListOf msg (Struct msg)
-> List msg (Persistent'SaveParams sturdyRef owner msg)
Persistent'SaveParams'List_ (ListOf (MutMsg s) (Struct (MutMsg s))
 -> List
      (MutMsg s) (Persistent'SaveParams sturdyRef owner (MutMsg s)))
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
-> m (List
        (MutMsg s) (Persistent'SaveParams sturdyRef owner (MutMsg s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
Untyped.allocCompositeList MutMsg s
msg Word16
0 Word16
1 Int
len))
get_Persistent'SaveParams'sealFor :: ((Untyped.ReadCtx m msg)
                                     ,(Classes.FromPtr msg owner)) => (Persistent'SaveParams sturdyRef owner msg) -> (m owner)
get_Persistent'SaveParams'sealFor :: Persistent'SaveParams sturdyRef owner msg -> m owner
get_Persistent'SaveParams'sealFor (Persistent'SaveParams'newtype_ Struct msg
struct) = (do
    Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) msg.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (msg -> Maybe (Ptr msg) -> m owner
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
    )
set_Persistent'SaveParams'sealFor :: ((Untyped.RWCtx m s)
                                     ,(Classes.ToPtr s owner)) => (Persistent'SaveParams sturdyRef owner (Message.MutMsg s)) -> owner -> (m ())
set_Persistent'SaveParams'sealFor :: Persistent'SaveParams sturdyRef owner (MutMsg s) -> owner -> m ()
set_Persistent'SaveParams'sealFor (Persistent'SaveParams'newtype_ Struct (MutMsg s)
struct) owner
value = (do
    Maybe (Ptr (MutMsg s))
ptr <- (MutMsg s -> owner -> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr (Struct (MutMsg s) -> InMessage (Struct (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct (MutMsg s)
struct) owner
value)
    (Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m (MutMsg s), WriteCtx m s) =>
Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
Untyped.setPtr Maybe (Ptr (MutMsg s))
ptr Int
0 Struct (MutMsg s)
struct)
    )
has_Persistent'SaveParams'sealFor :: ((Untyped.ReadCtx m msg)) => (Persistent'SaveParams sturdyRef owner msg) -> (m Std_.Bool)
has_Persistent'SaveParams'sealFor :: Persistent'SaveParams sturdyRef owner msg -> m Bool
has_Persistent'SaveParams'sealFor (Persistent'SaveParams'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.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
newtype Persistent'SaveResults sturdyRef owner msg
    = Persistent'SaveResults'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (Persistent'SaveResults sturdyRef owner msg)) where
    fromStruct :: Struct msg -> m (Persistent'SaveResults sturdyRef owner msg)
fromStruct Struct msg
struct = (Persistent'SaveResults sturdyRef owner msg
-> m (Persistent'SaveResults sturdyRef owner msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg -> Persistent'SaveResults sturdyRef owner msg
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveResults sturdyRef owner msg
Persistent'SaveResults'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (Persistent'SaveResults sturdyRef owner msg)) where
    toStruct :: Persistent'SaveResults sturdyRef owner msg -> Struct msg
toStruct (Persistent'SaveResults'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (Persistent'SaveResults sturdyRef owner msg)) where
    type InMessage (Persistent'SaveResults sturdyRef owner msg) = msg
    message :: Persistent'SaveResults sturdyRef owner msg
-> InMessage (Persistent'SaveResults sturdyRef owner msg)
message (Persistent'SaveResults'newtype_ Struct msg
struct) = (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct)
instance (Untyped.MessageDefault (Persistent'SaveResults sturdyRef owner msg)) where
    messageDefault :: InMessage (Persistent'SaveResults sturdyRef owner msg)
-> Persistent'SaveResults sturdyRef owner msg
messageDefault InMessage (Persistent'SaveResults sturdyRef owner msg)
msg = (Struct msg -> Persistent'SaveResults sturdyRef owner msg
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveResults sturdyRef owner msg
Persistent'SaveResults'newtype_ (InMessage (Struct msg) -> Struct msg
forall a. MessageDefault a => InMessage a -> a
Untyped.messageDefault InMessage (Struct msg)
InMessage (Persistent'SaveResults sturdyRef owner msg)
msg))
instance (Classes.FromPtr msg (Persistent'SaveResults sturdyRef owner msg)) where
    fromPtr :: msg
-> Maybe (Ptr msg)
-> m (Persistent'SaveResults sturdyRef owner msg)
fromPtr msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Persistent'SaveResults sturdyRef owner msg
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveResults sturdyRef owner msg
Persistent'SaveResults'newtype_ (Struct msg -> Persistent'SaveResults sturdyRef owner msg)
-> m (Struct msg) -> m (Persistent'SaveResults sturdyRef owner msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (Struct msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (Persistent'SaveResults sturdyRef owner (Message.MutMsg s))) where
    toPtr :: MutMsg s
-> Persistent'SaveResults sturdyRef owner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
toPtr MutMsg s
msg (Persistent'SaveResults'newtype_ Struct (MutMsg s)
struct) = (MutMsg s -> Struct (MutMsg s) -> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr MutMsg s
msg Struct (MutMsg s)
struct)
instance (Classes.Allocate s (Persistent'SaveResults sturdyRef owner (Message.MutMsg s))) where
    new :: MutMsg s -> m (Persistent'SaveResults sturdyRef owner (MutMsg s))
new MutMsg s
msg = (Struct (MutMsg s)
-> Persistent'SaveResults sturdyRef owner (MutMsg s)
forall sturdyRef owner msg.
Struct msg -> Persistent'SaveResults sturdyRef owner msg
Persistent'SaveResults'newtype_ (Struct (MutMsg s)
 -> Persistent'SaveResults sturdyRef owner (MutMsg s))
-> m (Struct (MutMsg s))
-> m (Persistent'SaveResults sturdyRef owner (MutMsg s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
Untyped.allocStruct MutMsg s
msg Word16
0 Word16
1))
instance (Basics.ListElem msg (Persistent'SaveResults sturdyRef owner msg)) where
    newtype List msg (Persistent'SaveResults sturdyRef owner msg)
        = Persistent'SaveResults'List_ (Untyped.ListOf msg (Untyped.Struct msg))
    listFromPtr :: msg
-> Maybe (Ptr msg)
-> m (List msg (Persistent'SaveResults sturdyRef owner msg))
listFromPtr msg
msg Maybe (Ptr msg)
ptr = (ListOf msg (Struct msg)
-> List msg (Persistent'SaveResults sturdyRef owner msg)
forall msg sturdyRef owner.
ListOf msg (Struct msg)
-> List msg (Persistent'SaveResults sturdyRef owner msg)
Persistent'SaveResults'List_ (ListOf msg (Struct msg)
 -> List msg (Persistent'SaveResults sturdyRef owner msg))
-> m (ListOf msg (Struct msg))
-> m (List msg (Persistent'SaveResults sturdyRef owner msg))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (ListOf msg (Struct msg))
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
    toUntypedList :: List msg (Persistent'SaveResults sturdyRef owner msg) -> List msg
toUntypedList (Persistent'SaveResults'List_ l) = (ListOf msg (Struct msg) -> List msg
forall msg. ListOf msg (Struct msg) -> List msg
Untyped.ListStruct ListOf msg (Struct msg)
l)
    length :: List msg (Persistent'SaveResults sturdyRef owner msg) -> Int
length (Persistent'SaveResults'List_ l) = (ListOf msg (Struct msg) -> Int
forall msg a. ListOf msg a -> Int
Untyped.length ListOf msg (Struct msg)
l)
    index :: Int
-> List msg (Persistent'SaveResults sturdyRef owner msg)
-> m (Persistent'SaveResults sturdyRef owner msg)
index Int
i (Persistent'SaveResults'List_ l) = (do
        Struct msg
elt <- (Int -> ListOf msg (Struct msg) -> m (Struct msg)
forall (m :: * -> *) msg a.
ReadCtx m msg =>
Int -> ListOf msg a -> m a
Untyped.index Int
i ListOf msg (Struct msg)
l)
        (Struct msg -> m (Persistent'SaveResults sturdyRef owner msg)
forall msg a (m :: * -> *).
(FromStruct msg a, ReadCtx m msg) =>
Struct msg -> m a
Classes.fromStruct Struct msg
elt)
        )
instance (Basics.MutListElem s (Persistent'SaveResults sturdyRef owner (Message.MutMsg s))) where
    setIndex :: Persistent'SaveResults sturdyRef owner (MutMsg s)
-> Int
-> List
     (MutMsg s) (Persistent'SaveResults sturdyRef owner (MutMsg s))
-> m ()
setIndex (Persistent'SaveResults'newtype_ Struct (MutMsg s)
elt) Int
i (Persistent'SaveResults'List_ l) = (Struct (MutMsg s)
-> Int -> ListOf (MutMsg s) (Struct (MutMsg s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf (MutMsg s) a -> m ()
Untyped.setIndex Struct (MutMsg s)
elt Int
i ListOf (MutMsg s) (Struct (MutMsg s))
l)
    newList :: MutMsg s
-> Int
-> m (List
        (MutMsg s) (Persistent'SaveResults sturdyRef owner (MutMsg s)))
newList MutMsg s
msg Int
len = (ListOf (MutMsg s) (Struct (MutMsg s))
-> List
     (MutMsg s) (Persistent'SaveResults sturdyRef owner (MutMsg s))
forall msg sturdyRef owner.
ListOf msg (Struct msg)
-> List msg (Persistent'SaveResults sturdyRef owner msg)
Persistent'SaveResults'List_ (ListOf (MutMsg s) (Struct (MutMsg s))
 -> List
      (MutMsg s) (Persistent'SaveResults sturdyRef owner (MutMsg s)))
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
-> m (List
        (MutMsg s) (Persistent'SaveResults sturdyRef owner (MutMsg s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
Untyped.allocCompositeList MutMsg s
msg Word16
0 Word16
1 Int
len))
get_Persistent'SaveResults'sturdyRef :: ((Untyped.ReadCtx m msg)
                                        ,(Classes.FromPtr msg sturdyRef)) => (Persistent'SaveResults sturdyRef owner msg) -> (m sturdyRef)
get_Persistent'SaveResults'sturdyRef :: Persistent'SaveResults sturdyRef owner msg -> m sturdyRef
get_Persistent'SaveResults'sturdyRef (Persistent'SaveResults'newtype_ Struct msg
struct) = (do
    Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) msg.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (msg -> Maybe (Ptr msg) -> m sturdyRef
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
    )
set_Persistent'SaveResults'sturdyRef :: ((Untyped.RWCtx m s)
                                        ,(Classes.ToPtr s sturdyRef)) => (Persistent'SaveResults sturdyRef owner (Message.MutMsg s)) -> sturdyRef -> (m ())
set_Persistent'SaveResults'sturdyRef :: Persistent'SaveResults sturdyRef owner (MutMsg s)
-> sturdyRef -> m ()
set_Persistent'SaveResults'sturdyRef (Persistent'SaveResults'newtype_ Struct (MutMsg s)
struct) sturdyRef
value = (do
    Maybe (Ptr (MutMsg s))
ptr <- (MutMsg s -> sturdyRef -> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr (Struct (MutMsg s) -> InMessage (Struct (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct (MutMsg s)
struct) sturdyRef
value)
    (Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m (MutMsg s), WriteCtx m s) =>
Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
Untyped.setPtr Maybe (Ptr (MutMsg s))
ptr Int
0 Struct (MutMsg s)
struct)
    )
has_Persistent'SaveResults'sturdyRef :: ((Untyped.ReadCtx m msg)) => (Persistent'SaveResults sturdyRef owner msg) -> (m Std_.Bool)
has_Persistent'SaveResults'sturdyRef :: Persistent'SaveResults sturdyRef owner msg -> m Bool
has_Persistent'SaveResults'sturdyRef (Persistent'SaveResults'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.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
newtype RealmGateway internalRef externalRef internalOwner externalOwner msg
    = RealmGateway'newtype_ (Std_.Maybe (Untyped.Cap msg))
instance (Classes.FromPtr msg (RealmGateway internalRef externalRef internalOwner externalOwner msg)) where
    fromPtr :: msg
-> Maybe (Ptr msg)
-> m (RealmGateway
        internalRef externalRef internalOwner externalOwner msg)
fromPtr msg
msg Maybe (Ptr msg)
ptr = (Maybe (Cap msg)
-> RealmGateway
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Maybe (Cap msg)
-> RealmGateway
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'newtype_ (Maybe (Cap msg)
 -> RealmGateway
      internalRef externalRef internalOwner externalOwner msg)
-> m (Maybe (Cap msg))
-> m (RealmGateway
        internalRef externalRef internalOwner externalOwner msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (Maybe (Cap msg))
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (RealmGateway internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    toPtr :: MutMsg s
-> RealmGateway
     internalRef externalRef internalOwner externalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
toPtr MutMsg s
msg (RealmGateway'newtype_ (Maybe (Cap (MutMsg s))
Std_.Nothing)) = (Maybe (Ptr (MutMsg s)) -> m (Maybe (Ptr (MutMsg s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Maybe (Ptr (MutMsg s))
forall a. Maybe a
Std_.Nothing)
    toPtr MutMsg s
msg (RealmGateway'newtype_ (Std_.Just Cap (MutMsg s)
cap)) = (Maybe (Ptr (MutMsg s)) -> m (Maybe (Ptr (MutMsg s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Ptr (MutMsg s) -> Maybe (Ptr (MutMsg s))
forall a. a -> Maybe a
Std_.Just (Cap (MutMsg s) -> Ptr (MutMsg s)
forall msg. Cap msg -> Ptr msg
Untyped.PtrCap Cap (MutMsg s)
cap)))
newtype RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg
    = RealmGateway'import'params'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    fromStruct :: Struct msg
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
fromStruct Struct msg
struct = (RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'import'params'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    toStruct :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> Struct msg
toStruct (RealmGateway'import'params'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    type InMessage (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) = msg
    message :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> InMessage
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
message (RealmGateway'import'params'newtype_ Struct msg
struct) = (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct)
instance (Untyped.MessageDefault (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    messageDefault :: InMessage
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg)
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
messageDefault InMessage
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg)
msg = (Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'import'params'newtype_ (InMessage (Struct msg) -> Struct msg
forall a. MessageDefault a => InMessage a -> a
Untyped.messageDefault InMessage (Struct msg)
InMessage
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg)
msg))
instance (Classes.FromPtr msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    fromPtr :: msg
-> Maybe (Ptr msg)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
fromPtr msg
msg Maybe (Ptr msg)
ptr = (Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'import'params'newtype_ (Struct msg
 -> RealmGateway'import'params
      internalRef externalRef internalOwner externalOwner msg)
-> m (Struct msg)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (Struct msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    toPtr :: MutMsg s
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
toPtr MutMsg s
msg (RealmGateway'import'params'newtype_ Struct (MutMsg s)
struct) = (MutMsg s -> Struct (MutMsg s) -> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr MutMsg s
msg Struct (MutMsg s)
struct)
instance (Classes.Allocate s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    new :: MutMsg s
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
new MutMsg s
msg = (Struct (MutMsg s)
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner (MutMsg s)
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'import'params'newtype_ (Struct (MutMsg s)
 -> RealmGateway'import'params
      internalRef externalRef internalOwner externalOwner (MutMsg s))
-> m (Struct (MutMsg s))
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
Untyped.allocStruct MutMsg s
msg Word16
0 Word16
2))
instance (Basics.ListElem msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    newtype List msg (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)
        = RealmGateway'import'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
    listFromPtr :: msg
-> Maybe (Ptr msg)
-> m (List
        msg
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner msg))
listFromPtr msg
msg Maybe (Ptr msg)
ptr = (ListOf msg (Struct msg)
-> List
     msg
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
forall msg internalRef externalRef internalOwner externalOwner.
ListOf msg (Struct msg)
-> List
     msg
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
RealmGateway'import'params'List_ (ListOf msg (Struct msg)
 -> List
      msg
      (RealmGateway'import'params
         internalRef externalRef internalOwner externalOwner msg))
-> m (ListOf msg (Struct msg))
-> m (List
        msg
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner msg))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (ListOf msg (Struct msg))
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
    toUntypedList :: List
  msg
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg)
-> List msg
toUntypedList (RealmGateway'import'params'List_ l) = (ListOf msg (Struct msg) -> List msg
forall msg. ListOf msg (Struct msg) -> List msg
Untyped.ListStruct ListOf msg (Struct msg)
l)
    length :: List
  msg
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg)
-> Int
length (RealmGateway'import'params'List_ l) = (ListOf msg (Struct msg) -> Int
forall msg a. ListOf msg a -> Int
Untyped.length ListOf msg (Struct msg)
l)
    index :: Int
-> List
     msg
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
index Int
i (RealmGateway'import'params'List_ l) = (do
        Struct msg
elt <- (Int -> ListOf msg (Struct msg) -> m (Struct msg)
forall (m :: * -> *) msg a.
ReadCtx m msg =>
Int -> ListOf msg a -> m a
Untyped.index Int
i ListOf msg (Struct msg)
l)
        (Struct msg
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
forall msg a (m :: * -> *).
(FromStruct msg a, ReadCtx m msg) =>
Struct msg -> m a
Classes.fromStruct Struct msg
elt)
        )
instance (Basics.MutListElem s (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    setIndex :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Int
-> List
     (MutMsg s)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
-> m ()
setIndex (RealmGateway'import'params'newtype_ Struct (MutMsg s)
elt) Int
i (RealmGateway'import'params'List_ l) = (Struct (MutMsg s)
-> Int -> ListOf (MutMsg s) (Struct (MutMsg s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf (MutMsg s) a -> m ()
Untyped.setIndex Struct (MutMsg s)
elt Int
i ListOf (MutMsg s) (Struct (MutMsg s))
l)
    newList :: MutMsg s
-> Int
-> m (List
        (MutMsg s)
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner (MutMsg s)))
newList MutMsg s
msg Int
len = (ListOf (MutMsg s) (Struct (MutMsg s))
-> List
     (MutMsg s)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
forall msg internalRef externalRef internalOwner externalOwner.
ListOf msg (Struct msg)
-> List
     msg
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
RealmGateway'import'params'List_ (ListOf (MutMsg s) (Struct (MutMsg s))
 -> List
      (MutMsg s)
      (RealmGateway'import'params
         internalRef externalRef internalOwner externalOwner (MutMsg s)))
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
-> m (List
        (MutMsg s)
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner (MutMsg s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
Untyped.allocCompositeList MutMsg s
msg Word16
0 Word16
2 Int
len))
get_RealmGateway'import'params'cap :: ((Untyped.ReadCtx m msg)
                                      ,(Classes.FromPtr msg (Persistent externalRef externalOwner msg))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) -> (m (Persistent externalRef externalOwner msg))
get_RealmGateway'import'params'cap :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> m (Persistent externalRef externalOwner msg)
get_RealmGateway'import'params'cap (RealmGateway'import'params'newtype_ Struct msg
struct) = (do
    Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) msg.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (msg
-> Maybe (Ptr msg) -> m (Persistent externalRef externalOwner msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
    )
set_RealmGateway'import'params'cap :: ((Untyped.RWCtx m s)
                                      ,(Classes.ToPtr s (Persistent externalRef externalOwner (Message.MutMsg s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent externalRef externalOwner (Message.MutMsg s)) -> (m ())
set_RealmGateway'import'params'cap :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent externalRef externalOwner (MutMsg s) -> m ()
set_RealmGateway'import'params'cap (RealmGateway'import'params'newtype_ Struct (MutMsg s)
struct) Persistent externalRef externalOwner (MutMsg s)
value = (do
    Maybe (Ptr (MutMsg s))
ptr <- (MutMsg s
-> Persistent externalRef externalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr (Struct (MutMsg s) -> InMessage (Struct (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct (MutMsg s)
struct) Persistent externalRef externalOwner (MutMsg s)
value)
    (Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m (MutMsg s), WriteCtx m s) =>
Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
Untyped.setPtr Maybe (Ptr (MutMsg s))
ptr Int
0 Struct (MutMsg s)
struct)
    )
has_RealmGateway'import'params'cap :: ((Untyped.ReadCtx m msg)) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) -> (m Std_.Bool)
has_RealmGateway'import'params'cap :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> m Bool
has_RealmGateway'import'params'cap (RealmGateway'import'params'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.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
get_RealmGateway'import'params'params :: ((Untyped.ReadCtx m msg)
                                         ,(Classes.FromPtr msg (Persistent'SaveParams internalRef internalOwner msg))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) -> (m (Persistent'SaveParams internalRef internalOwner msg))
get_RealmGateway'import'params'params :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> m (Persistent'SaveParams internalRef internalOwner msg)
get_RealmGateway'import'params'params (RealmGateway'import'params'newtype_ Struct msg
struct) = (do
    Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) msg.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
    (msg
-> Maybe (Ptr msg)
-> m (Persistent'SaveParams internalRef internalOwner msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
    )
set_RealmGateway'import'params'params :: ((Untyped.RWCtx m s)
                                         ,(Classes.ToPtr s (Persistent'SaveParams internalRef internalOwner (Message.MutMsg s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent'SaveParams internalRef internalOwner (Message.MutMsg s)) -> (m ())
set_RealmGateway'import'params'params :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent'SaveParams internalRef internalOwner (MutMsg s)
-> m ()
set_RealmGateway'import'params'params (RealmGateway'import'params'newtype_ Struct (MutMsg s)
struct) Persistent'SaveParams internalRef internalOwner (MutMsg s)
value = (do
    Maybe (Ptr (MutMsg s))
ptr <- (MutMsg s
-> Persistent'SaveParams internalRef internalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr (Struct (MutMsg s) -> InMessage (Struct (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct (MutMsg s)
struct) Persistent'SaveParams internalRef internalOwner (MutMsg s)
value)
    (Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m (MutMsg s), WriteCtx m s) =>
Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
Untyped.setPtr Maybe (Ptr (MutMsg s))
ptr Int
1 Struct (MutMsg s)
struct)
    )
has_RealmGateway'import'params'params :: ((Untyped.ReadCtx m msg)) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg) -> (m Std_.Bool)
has_RealmGateway'import'params'params :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner msg
-> m Bool
has_RealmGateway'import'params'params (RealmGateway'import'params'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.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_RealmGateway'import'params'params :: ((Untyped.RWCtx m s)) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (m (Persistent'SaveParams internalRef internalOwner (Message.MutMsg s)))
new_RealmGateway'import'params'params :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> m (Persistent'SaveParams internalRef internalOwner (MutMsg s))
new_RealmGateway'import'params'params RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
struct = (do
    Persistent'SaveParams internalRef internalOwner (MutMsg s)
result <- (MutMsg s
-> m (Persistent'SaveParams internalRef internalOwner (MutMsg s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
MutMsg s -> m e
Classes.new (RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> InMessage
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
struct))
    (RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent'SaveParams internalRef internalOwner (MutMsg s)
-> m ()
forall (m :: * -> *) s internalRef internalOwner externalRef
       externalOwner.
(RWCtx m s,
 ToPtr
   s (Persistent'SaveParams internalRef internalOwner (MutMsg s))) =>
RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent'SaveParams internalRef internalOwner (MutMsg s)
-> m ()
set_RealmGateway'import'params'params RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
struct Persistent'SaveParams internalRef internalOwner (MutMsg s)
result)
    (Persistent'SaveParams internalRef internalOwner (MutMsg s)
-> m (Persistent'SaveParams internalRef internalOwner (MutMsg s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Persistent'SaveParams internalRef internalOwner (MutMsg s)
result)
    )
newtype RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg
    = RealmGateway'export'params'newtype_ (Untyped.Struct msg)
instance (Classes.FromStruct msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    fromStruct :: Struct msg
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
fromStruct Struct msg
struct = (RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'export'params'newtype_ Struct msg
struct))
instance (Classes.ToStruct msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    toStruct :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> Struct msg
toStruct (RealmGateway'export'params'newtype_ Struct msg
struct) = Struct msg
struct
instance (Untyped.HasMessage (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    type InMessage (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) = msg
    message :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> InMessage
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
message (RealmGateway'export'params'newtype_ Struct msg
struct) = (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct)
instance (Untyped.MessageDefault (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    messageDefault :: InMessage
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg)
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
messageDefault InMessage
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg)
msg = (Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'export'params'newtype_ (InMessage (Struct msg) -> Struct msg
forall a. MessageDefault a => InMessage a -> a
Untyped.messageDefault InMessage (Struct msg)
InMessage
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg)
msg))
instance (Classes.FromPtr msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    fromPtr :: msg
-> Maybe (Ptr msg)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
fromPtr msg
msg Maybe (Ptr msg)
ptr = (Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'export'params'newtype_ (Struct msg
 -> RealmGateway'export'params
      internalRef externalRef internalOwner externalOwner msg)
-> m (Struct msg)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (Struct msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
instance (Classes.ToPtr s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    toPtr :: MutMsg s
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
toPtr MutMsg s
msg (RealmGateway'export'params'newtype_ Struct (MutMsg s)
struct) = (MutMsg s -> Struct (MutMsg s) -> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr MutMsg s
msg Struct (MutMsg s)
struct)
instance (Classes.Allocate s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    new :: MutMsg s
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
new MutMsg s
msg = (Struct (MutMsg s)
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner (MutMsg s)
forall internalRef externalRef internalOwner externalOwner msg.
Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'export'params'newtype_ (Struct (MutMsg s)
 -> RealmGateway'export'params
      internalRef externalRef internalOwner externalOwner (MutMsg s))
-> m (Struct (MutMsg s))
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s -> Word16 -> Word16 -> m (Struct (MutMsg s))
Untyped.allocStruct MutMsg s
msg Word16
0 Word16
2))
instance (Basics.ListElem msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    newtype List msg (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)
        = RealmGateway'export'params'List_ (Untyped.ListOf msg (Untyped.Struct msg))
    listFromPtr :: msg
-> Maybe (Ptr msg)
-> m (List
        msg
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner msg))
listFromPtr msg
msg Maybe (Ptr msg)
ptr = (ListOf msg (Struct msg)
-> List
     msg
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
forall msg internalRef externalRef internalOwner externalOwner.
ListOf msg (Struct msg)
-> List
     msg
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
RealmGateway'export'params'List_ (ListOf msg (Struct msg)
 -> List
      msg
      (RealmGateway'export'params
         internalRef externalRef internalOwner externalOwner msg))
-> m (ListOf msg (Struct msg))
-> m (List
        msg
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner msg))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (msg -> Maybe (Ptr msg) -> m (ListOf msg (Struct msg))
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr msg
msg Maybe (Ptr msg)
ptr))
    toUntypedList :: List
  msg
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg)
-> List msg
toUntypedList (RealmGateway'export'params'List_ l) = (ListOf msg (Struct msg) -> List msg
forall msg. ListOf msg (Struct msg) -> List msg
Untyped.ListStruct ListOf msg (Struct msg)
l)
    length :: List
  msg
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg)
-> Int
length (RealmGateway'export'params'List_ l) = (ListOf msg (Struct msg) -> Int
forall msg a. ListOf msg a -> Int
Untyped.length ListOf msg (Struct msg)
l)
    index :: Int
-> List
     msg
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
index Int
i (RealmGateway'export'params'List_ l) = (do
        Struct msg
elt <- (Int -> ListOf msg (Struct msg) -> m (Struct msg)
forall (m :: * -> *) msg a.
ReadCtx m msg =>
Int -> ListOf msg a -> m a
Untyped.index Int
i ListOf msg (Struct msg)
l)
        (Struct msg
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
forall msg a (m :: * -> *).
(FromStruct msg a, ReadCtx m msg) =>
Struct msg -> m a
Classes.fromStruct Struct msg
elt)
        )
instance (Basics.MutListElem s (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s))) where
    setIndex :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Int
-> List
     (MutMsg s)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
-> m ()
setIndex (RealmGateway'export'params'newtype_ Struct (MutMsg s)
elt) Int
i (RealmGateway'export'params'List_ l) = (Struct (MutMsg s)
-> Int -> ListOf (MutMsg s) (Struct (MutMsg s)) -> m ()
forall (m :: * -> *) s a.
RWCtx m s =>
a -> Int -> ListOf (MutMsg s) a -> m ()
Untyped.setIndex Struct (MutMsg s)
elt Int
i ListOf (MutMsg s) (Struct (MutMsg s))
l)
    newList :: MutMsg s
-> Int
-> m (List
        (MutMsg s)
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner (MutMsg s)))
newList MutMsg s
msg Int
len = (ListOf (MutMsg s) (Struct (MutMsg s))
-> List
     (MutMsg s)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
forall msg internalRef externalRef internalOwner externalOwner.
ListOf msg (Struct msg)
-> List
     msg
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
RealmGateway'export'params'List_ (ListOf (MutMsg s) (Struct (MutMsg s))
 -> List
      (MutMsg s)
      (RealmGateway'export'params
         internalRef externalRef internalOwner externalOwner (MutMsg s)))
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
-> m (List
        (MutMsg s)
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner (MutMsg s)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
forall (m :: * -> *) s.
WriteCtx m s =>
MutMsg s
-> Word16
-> Word16
-> Int
-> m (ListOf (MutMsg s) (Struct (MutMsg s)))
Untyped.allocCompositeList MutMsg s
msg Word16
0 Word16
2 Int
len))
get_RealmGateway'export'params'cap :: ((Untyped.ReadCtx m msg)
                                      ,(Classes.FromPtr msg (Persistent internalRef internalOwner msg))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) -> (m (Persistent internalRef internalOwner msg))
get_RealmGateway'export'params'cap :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> m (Persistent internalRef internalOwner msg)
get_RealmGateway'export'params'cap (RealmGateway'export'params'newtype_ Struct msg
struct) = (do
    Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) msg.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (msg
-> Maybe (Ptr msg) -> m (Persistent internalRef internalOwner msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
    )
set_RealmGateway'export'params'cap :: ((Untyped.RWCtx m s)
                                      ,(Classes.ToPtr s (Persistent internalRef internalOwner (Message.MutMsg s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent internalRef internalOwner (Message.MutMsg s)) -> (m ())
set_RealmGateway'export'params'cap :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent internalRef internalOwner (MutMsg s) -> m ()
set_RealmGateway'export'params'cap (RealmGateway'export'params'newtype_ Struct (MutMsg s)
struct) Persistent internalRef internalOwner (MutMsg s)
value = (do
    Maybe (Ptr (MutMsg s))
ptr <- (MutMsg s
-> Persistent internalRef internalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr (Struct (MutMsg s) -> InMessage (Struct (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct (MutMsg s)
struct) Persistent internalRef internalOwner (MutMsg s)
value)
    (Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m (MutMsg s), WriteCtx m s) =>
Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
Untyped.setPtr Maybe (Ptr (MutMsg s))
ptr Int
0 Struct (MutMsg s)
struct)
    )
has_RealmGateway'export'params'cap :: ((Untyped.ReadCtx m msg)) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) -> (m Std_.Bool)
has_RealmGateway'export'params'cap :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> m Bool
has_RealmGateway'export'params'cap (RealmGateway'export'params'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.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct))
get_RealmGateway'export'params'params :: ((Untyped.ReadCtx m msg)
                                         ,(Classes.FromPtr msg (Persistent'SaveParams externalRef externalOwner msg))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) -> (m (Persistent'SaveParams externalRef externalOwner msg))
get_RealmGateway'export'params'params :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> m (Persistent'SaveParams externalRef externalOwner msg)
get_RealmGateway'export'params'params (RealmGateway'export'params'newtype_ Struct msg
struct) = (do
    Maybe (Ptr msg)
ptr <- (Int -> Struct msg -> m (Maybe (Ptr msg))
forall (m :: * -> *) msg.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
    (msg
-> Maybe (Ptr msg)
-> m (Persistent'SaveParams externalRef externalOwner msg)
forall msg a (m :: * -> *).
(FromPtr msg a, ReadCtx m msg) =>
msg -> Maybe (Ptr msg) -> m a
Classes.fromPtr (Struct msg -> InMessage (Struct msg)
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct msg
struct) Maybe (Ptr msg)
ptr)
    )
set_RealmGateway'export'params'params :: ((Untyped.RWCtx m s)
                                         ,(Classes.ToPtr s (Persistent'SaveParams externalRef externalOwner (Message.MutMsg s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (Persistent'SaveParams externalRef externalOwner (Message.MutMsg s)) -> (m ())
set_RealmGateway'export'params'params :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent'SaveParams externalRef externalOwner (MutMsg s)
-> m ()
set_RealmGateway'export'params'params (RealmGateway'export'params'newtype_ Struct (MutMsg s)
struct) Persistent'SaveParams externalRef externalOwner (MutMsg s)
value = (do
    Maybe (Ptr (MutMsg s))
ptr <- (MutMsg s
-> Persistent'SaveParams externalRef externalOwner (MutMsg s)
-> m (Maybe (Ptr (MutMsg s)))
forall s a (m :: * -> *).
(ToPtr s a, WriteCtx m s) =>
MutMsg s -> a -> m (Maybe (Ptr (MutMsg s)))
Classes.toPtr (Struct (MutMsg s) -> InMessage (Struct (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message Struct (MutMsg s)
struct) Persistent'SaveParams externalRef externalOwner (MutMsg s)
value)
    (Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
forall (m :: * -> *) s.
(ReadCtx m (MutMsg s), WriteCtx m s) =>
Maybe (Ptr (MutMsg s)) -> Int -> Struct (MutMsg s) -> m ()
Untyped.setPtr Maybe (Ptr (MutMsg s))
ptr Int
1 Struct (MutMsg s)
struct)
    )
has_RealmGateway'export'params'params :: ((Untyped.ReadCtx m msg)) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg) -> (m Std_.Bool)
has_RealmGateway'export'params'params :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner msg
-> m Bool
has_RealmGateway'export'params'params (RealmGateway'export'params'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.
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct))
new_RealmGateway'export'params'params :: ((Untyped.RWCtx m s)) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.MutMsg s)) -> (m (Persistent'SaveParams externalRef externalOwner (Message.MutMsg s)))
new_RealmGateway'export'params'params :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> m (Persistent'SaveParams externalRef externalOwner (MutMsg s))
new_RealmGateway'export'params'params RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
struct = (do
    Persistent'SaveParams externalRef externalOwner (MutMsg s)
result <- (MutMsg s
-> m (Persistent'SaveParams externalRef externalOwner (MutMsg s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
MutMsg s -> m e
Classes.new (RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> InMessage
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner (MutMsg s))
forall a. HasMessage a => a -> InMessage a
Untyped.message RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
struct))
    (RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent'SaveParams externalRef externalOwner (MutMsg s)
-> m ()
forall (m :: * -> *) s externalRef externalOwner internalRef
       internalOwner.
(RWCtx m s,
 ToPtr
   s (Persistent'SaveParams externalRef externalOwner (MutMsg s))) =>
RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
-> Persistent'SaveParams externalRef externalOwner (MutMsg s)
-> m ()
set_RealmGateway'export'params'params RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner (MutMsg s)
struct Persistent'SaveParams externalRef externalOwner (MutMsg s)
result)
    (Persistent'SaveParams externalRef externalOwner (MutMsg s)
-> m (Persistent'SaveParams externalRef externalOwner (MutMsg s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Persistent'SaveParams externalRef externalOwner (MutMsg s)
result)
    )