{-# 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.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 :: Message msg
-> Maybe (Ptr msg) -> m (Persistent sturdyRef owner msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Maybe (Cap msg) -> Persistent sturdyRef owner msg
forall sturdyRef owner (msg :: Mutability).
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
<$> (Message msg -> Maybe (Ptr msg) -> m (Maybe (Cap 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 (Persistent sturdyRef owner (Message.Mut s))) where
    toPtr :: Message ('Mut s)
-> Persistent sturdyRef owner ('Mut s) -> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Persistent'newtype_ (Maybe (Cap ('Mut s))
Std_.Nothing)) = (Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Maybe (Ptr ('Mut s))
forall a. Maybe a
Std_.Nothing)
    toPtr Message ('Mut s)
msg (Persistent'newtype_ (Std_.Just Cap ('Mut s)
cap)) = (Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Ptr ('Mut s) -> Maybe (Ptr ('Mut s))
forall a. a -> Maybe a
Std_.Just (Cap ('Mut s) -> Ptr ('Mut s)
forall (mut :: Mutability). Cap mut -> Ptr mut
Untyped.PtrCap Cap ('Mut 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 :: Mutability).
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 mut) mut) where
    message :: Persistent'SaveParams sturdyRef owner mut -> Message mut
message (Persistent'SaveParams'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 (Persistent'SaveParams sturdyRef owner mut) mut) where
    messageDefault :: Message mut -> m (Persistent'SaveParams sturdyRef owner mut)
messageDefault Message mut
msg = (Struct mut -> Persistent'SaveParams sturdyRef owner mut
forall sturdyRef owner (msg :: Mutability).
Struct msg -> Persistent'SaveParams sturdyRef owner msg
Persistent'SaveParams'newtype_ (Struct mut -> Persistent'SaveParams sturdyRef owner mut)
-> m (Struct mut) -> m (Persistent'SaveParams sturdyRef owner 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 (Persistent'SaveParams sturdyRef owner msg)) where
    fromPtr :: Message msg
-> Maybe (Ptr msg) -> m (Persistent'SaveParams sturdyRef owner msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Persistent'SaveParams sturdyRef owner msg
forall sturdyRef owner (msg :: Mutability).
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
<$> (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 (Persistent'SaveParams sturdyRef owner (Message.Mut s))) where
    toPtr :: Message ('Mut s)
-> Persistent'SaveParams sturdyRef owner ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Persistent'SaveParams'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 (Persistent'SaveParams sturdyRef owner (Message.Mut s))) where
    new :: Message ('Mut s)
-> m (Persistent'SaveParams sturdyRef owner ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Persistent'SaveParams sturdyRef owner ('Mut s)
forall sturdyRef owner (msg :: Mutability).
Struct msg -> Persistent'SaveParams sturdyRef owner msg
Persistent'SaveParams'newtype_ (Struct ('Mut s) -> Persistent'SaveParams sturdyRef owner ('Mut s))
-> m (Struct ('Mut s))
-> m (Persistent'SaveParams sturdyRef owner ('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 (Persistent'SaveParams sturdyRef owner mut)) where
    newtype List mut (Persistent'SaveParams sturdyRef owner mut)
        = Persistent'SaveParams'List_ (Untyped.ListOf mut (Untyped.Struct mut))
    listFromPtr :: Message mut
-> Maybe (Ptr mut)
-> m (List mut (Persistent'SaveParams sturdyRef owner mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut)
-> List mut (Persistent'SaveParams sturdyRef owner mut)
forall (mut :: Mutability) sturdyRef owner.
ListOf mut (Struct mut)
-> List mut (Persistent'SaveParams sturdyRef owner mut)
Persistent'SaveParams'List_ (ListOf mut (Struct mut)
 -> List mut (Persistent'SaveParams sturdyRef owner mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (Persistent'SaveParams sturdyRef owner 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 (Persistent'SaveParams sturdyRef owner mut) -> List mut
toUntypedList (Persistent'SaveParams'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 (Persistent'SaveParams sturdyRef owner mut) -> Int
length (Persistent'SaveParams'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 (Persistent'SaveParams sturdyRef owner mut)
-> m (Persistent'SaveParams sturdyRef owner mut)
index Int
i (Persistent'SaveParams'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 (Persistent'SaveParams sturdyRef owner 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 (Persistent'SaveParams sturdyRef owner (Message.Mut s))) where
    setIndex :: Persistent'SaveParams sturdyRef owner ('Mut s)
-> Int
-> List ('Mut s) (Persistent'SaveParams sturdyRef owner ('Mut s))
-> m ()
setIndex (Persistent'SaveParams'newtype_ Struct ('Mut s)
elt) Int
i (Persistent'SaveParams'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) (Persistent'SaveParams sturdyRef owner ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Persistent'SaveParams sturdyRef owner ('Mut s))
forall (mut :: Mutability) sturdyRef owner.
ListOf mut (Struct mut)
-> List mut (Persistent'SaveParams sturdyRef owner mut)
Persistent'SaveParams'List_ (ListOf ('Mut s) (Struct ('Mut s))
 -> List ('Mut s) (Persistent'SaveParams sturdyRef owner ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List
        ('Mut s) (Persistent'SaveParams sturdyRef owner ('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_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 :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (Message msg -> Maybe (Ptr msg) -> m owner
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_Persistent'SaveParams'sealFor :: ((Untyped.RWCtx m s)
                                     ,(Classes.ToPtr s owner)) => (Persistent'SaveParams sturdyRef owner (Message.Mut s)) -> owner -> (m ())
set_Persistent'SaveParams'sealFor :: Persistent'SaveParams sturdyRef owner ('Mut s) -> owner -> m ()
set_Persistent'SaveParams'sealFor (Persistent'SaveParams'newtype_ Struct ('Mut s)
struct) owner
value = (do
    Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> owner -> 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) owner
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_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 :: Mutability).
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 :: Mutability).
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 mut) mut) where
    message :: Persistent'SaveResults sturdyRef owner mut -> Message mut
message (Persistent'SaveResults'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 (Persistent'SaveResults sturdyRef owner mut) mut) where
    messageDefault :: Message mut -> m (Persistent'SaveResults sturdyRef owner mut)
messageDefault Message mut
msg = (Struct mut -> Persistent'SaveResults sturdyRef owner mut
forall sturdyRef owner (msg :: Mutability).
Struct msg -> Persistent'SaveResults sturdyRef owner msg
Persistent'SaveResults'newtype_ (Struct mut -> Persistent'SaveResults sturdyRef owner mut)
-> m (Struct mut) -> m (Persistent'SaveResults sturdyRef owner 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 (Persistent'SaveResults sturdyRef owner msg)) where
    fromPtr :: Message msg
-> Maybe (Ptr msg)
-> m (Persistent'SaveResults sturdyRef owner msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg -> Persistent'SaveResults sturdyRef owner msg
forall sturdyRef owner (msg :: Mutability).
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
<$> (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 (Persistent'SaveResults sturdyRef owner (Message.Mut s))) where
    toPtr :: Message ('Mut s)
-> Persistent'SaveResults sturdyRef owner ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (Persistent'SaveResults'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 (Persistent'SaveResults sturdyRef owner (Message.Mut s))) where
    new :: Message ('Mut s)
-> m (Persistent'SaveResults sturdyRef owner ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s) -> Persistent'SaveResults sturdyRef owner ('Mut s)
forall sturdyRef owner (msg :: Mutability).
Struct msg -> Persistent'SaveResults sturdyRef owner msg
Persistent'SaveResults'newtype_ (Struct ('Mut s)
 -> Persistent'SaveResults sturdyRef owner ('Mut s))
-> m (Struct ('Mut s))
-> m (Persistent'SaveResults sturdyRef owner ('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 (Persistent'SaveResults sturdyRef owner mut)) where
    newtype List mut (Persistent'SaveResults sturdyRef owner mut)
        = Persistent'SaveResults'List_ (Untyped.ListOf mut (Untyped.Struct mut))
    listFromPtr :: Message mut
-> Maybe (Ptr mut)
-> m (List mut (Persistent'SaveResults sturdyRef owner mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut)
-> List mut (Persistent'SaveResults sturdyRef owner mut)
forall (mut :: Mutability) sturdyRef owner.
ListOf mut (Struct mut)
-> List mut (Persistent'SaveResults sturdyRef owner mut)
Persistent'SaveResults'List_ (ListOf mut (Struct mut)
 -> List mut (Persistent'SaveResults sturdyRef owner mut))
-> m (ListOf mut (Struct mut))
-> m (List mut (Persistent'SaveResults sturdyRef owner 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 (Persistent'SaveResults sturdyRef owner mut) -> List mut
toUntypedList (Persistent'SaveResults'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 (Persistent'SaveResults sturdyRef owner mut) -> Int
length (Persistent'SaveResults'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 (Persistent'SaveResults sturdyRef owner mut)
-> m (Persistent'SaveResults sturdyRef owner mut)
index Int
i (Persistent'SaveResults'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 (Persistent'SaveResults sturdyRef owner 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 (Persistent'SaveResults sturdyRef owner (Message.Mut s))) where
    setIndex :: Persistent'SaveResults sturdyRef owner ('Mut s)
-> Int
-> List ('Mut s) (Persistent'SaveResults sturdyRef owner ('Mut s))
-> m ()
setIndex (Persistent'SaveResults'newtype_ Struct ('Mut s)
elt) Int
i (Persistent'SaveResults'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) (Persistent'SaveResults sturdyRef owner ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List ('Mut s) (Persistent'SaveResults sturdyRef owner ('Mut s))
forall (mut :: Mutability) sturdyRef owner.
ListOf mut (Struct mut)
-> List mut (Persistent'SaveResults sturdyRef owner mut)
Persistent'SaveResults'List_ (ListOf ('Mut s) (Struct ('Mut s))
 -> List ('Mut s) (Persistent'SaveResults sturdyRef owner ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List
        ('Mut s) (Persistent'SaveResults sturdyRef owner ('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_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 :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (Message msg -> Maybe (Ptr msg) -> m sturdyRef
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_Persistent'SaveResults'sturdyRef :: ((Untyped.RWCtx m s)
                                        ,(Classes.ToPtr s sturdyRef)) => (Persistent'SaveResults sturdyRef owner (Message.Mut s)) -> sturdyRef -> (m ())
set_Persistent'SaveResults'sturdyRef :: Persistent'SaveResults sturdyRef owner ('Mut s)
-> sturdyRef -> m ()
set_Persistent'SaveResults'sturdyRef (Persistent'SaveResults'newtype_ Struct ('Mut s)
struct) sturdyRef
value = (do
    Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s) -> sturdyRef -> 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) sturdyRef
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_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 :: Mutability).
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 :: Message msg
-> Maybe (Ptr msg)
-> m (RealmGateway
        internalRef externalRef internalOwner externalOwner msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Maybe (Cap msg)
-> RealmGateway
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
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
<$> (Message msg -> Maybe (Ptr msg) -> m (Maybe (Cap 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 (RealmGateway internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    toPtr :: Message ('Mut s)
-> RealmGateway
     internalRef externalRef internalOwner externalOwner ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (RealmGateway'newtype_ (Maybe (Cap ('Mut s))
Std_.Nothing)) = (Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Maybe (Ptr ('Mut s))
forall a. Maybe a
Std_.Nothing)
    toPtr Message ('Mut s)
msg (RealmGateway'newtype_ (Std_.Just Cap ('Mut s)
cap)) = (Maybe (Ptr ('Mut s)) -> m (Maybe (Ptr ('Mut s)))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure (Ptr ('Mut s) -> Maybe (Ptr ('Mut s))
forall a. a -> Maybe a
Std_.Just (Cap ('Mut s) -> Ptr ('Mut s)
forall (mut :: Mutability). Cap mut -> Ptr mut
Untyped.PtrCap Cap ('Mut 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 :: Mutability).
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 mut) mut) where
    message :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner mut
-> Message mut
message (RealmGateway'import'params'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 (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut) mut) where
    messageDefault :: Message mut
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner mut)
messageDefault Message mut
msg = (Struct mut
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner mut
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'import'params'newtype_ (Struct mut
 -> RealmGateway'import'params
      internalRef externalRef internalOwner externalOwner mut)
-> m (Struct mut)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner 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 (RealmGateway'import'params internalRef externalRef internalOwner externalOwner msg)) where
    fromPtr :: Message msg
-> Maybe (Ptr msg)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
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
<$> (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 (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    toPtr :: Message ('Mut s)
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (RealmGateway'import'params'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 (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    new :: Message ('Mut s)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s)
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner ('Mut s)
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
Struct msg
-> RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'import'params'newtype_ (Struct ('Mut s)
 -> RealmGateway'import'params
      internalRef externalRef internalOwner externalOwner ('Mut s))
-> m (Struct ('Mut s))
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner ('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
2))
instance (Basics.ListElem mut (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut)) where
    newtype List mut (RealmGateway'import'params internalRef externalRef internalOwner externalOwner mut)
        = RealmGateway'import'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
    listFromPtr :: Message mut
-> Maybe (Ptr mut)
-> m (List
        mut
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut)
-> List
     mut
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner mut)
forall (mut :: Mutability) internalRef externalRef internalOwner
       externalOwner.
ListOf mut (Struct mut)
-> List
     mut
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner mut)
RealmGateway'import'params'List_ (ListOf mut (Struct mut)
 -> List
      mut
      (RealmGateway'import'params
         internalRef externalRef internalOwner externalOwner mut))
-> m (ListOf mut (Struct mut))
-> m (List
        mut
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner 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
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner mut)
-> List mut
toUntypedList (RealmGateway'import'params'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
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner mut)
-> Int
length (RealmGateway'import'params'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
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner mut)
-> m (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner mut)
index Int
i (RealmGateway'import'params'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 (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner 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 (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    setIndex :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Int
-> List
     ('Mut s)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner ('Mut s))
-> m ()
setIndex (RealmGateway'import'params'newtype_ Struct ('Mut s)
elt) Int
i (RealmGateway'import'params'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)
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List
     ('Mut s)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner ('Mut s))
forall (mut :: Mutability) internalRef externalRef internalOwner
       externalOwner.
ListOf mut (Struct mut)
-> List
     mut
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner mut)
RealmGateway'import'params'List_ (ListOf ('Mut s) (Struct ('Mut s))
 -> List
      ('Mut s)
      (RealmGateway'import'params
         internalRef externalRef internalOwner externalOwner ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List
        ('Mut s)
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner ('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
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 :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (Message msg
-> Maybe (Ptr msg) -> m (Persistent externalRef externalOwner 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_RealmGateway'import'params'cap :: ((Untyped.RWCtx m s)
                                      ,(Classes.ToPtr s (Persistent externalRef externalOwner (Message.Mut s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent externalRef externalOwner (Message.Mut s)) -> (m ())
set_RealmGateway'import'params'cap :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent externalRef externalOwner ('Mut s) -> m ()
set_RealmGateway'import'params'cap (RealmGateway'import'params'newtype_ Struct ('Mut s)
struct) Persistent externalRef externalOwner ('Mut s)
value = (do
    Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Persistent externalRef externalOwner ('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) Persistent externalRef externalOwner ('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_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 :: Mutability).
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 :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
    (Message msg
-> Maybe (Ptr msg)
-> m (Persistent'SaveParams internalRef internalOwner 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_RealmGateway'import'params'params :: ((Untyped.RWCtx m s)
                                         ,(Classes.ToPtr s (Persistent'SaveParams internalRef internalOwner (Message.Mut s)))) => (RealmGateway'import'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent'SaveParams internalRef internalOwner (Message.Mut s)) -> (m ())
set_RealmGateway'import'params'params :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent'SaveParams internalRef internalOwner ('Mut s) -> m ()
set_RealmGateway'import'params'params (RealmGateway'import'params'newtype_ Struct ('Mut s)
struct) Persistent'SaveParams internalRef internalOwner ('Mut s)
value = (do
    Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Persistent'SaveParams internalRef internalOwner ('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) Persistent'SaveParams internalRef internalOwner ('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_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 :: Mutability).
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.Mut s)) -> (m (Persistent'SaveParams internalRef internalOwner (Message.Mut s)))
new_RealmGateway'import'params'params :: RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> m (Persistent'SaveParams internalRef internalOwner ('Mut s))
new_RealmGateway'import'params'params RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
struct = (do
    Persistent'SaveParams internalRef internalOwner ('Mut s)
result <- (Message ('Mut s)
-> m (Persistent'SaveParams internalRef internalOwner ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
struct))
    (RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent'SaveParams internalRef internalOwner ('Mut s) -> m ()
forall (m :: * -> *) s internalRef internalOwner externalRef
       externalOwner.
(RWCtx m s,
 ToPtr
   s (Persistent'SaveParams internalRef internalOwner ('Mut s))) =>
RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent'SaveParams internalRef internalOwner ('Mut s) -> m ()
set_RealmGateway'import'params'params RealmGateway'import'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
struct Persistent'SaveParams internalRef internalOwner ('Mut s)
result)
    (Persistent'SaveParams internalRef internalOwner ('Mut s)
-> m (Persistent'SaveParams internalRef internalOwner ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Persistent'SaveParams internalRef internalOwner ('Mut 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 :: Mutability).
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 mut) mut) where
    message :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner mut
-> Message mut
message (RealmGateway'export'params'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 (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut) mut) where
    messageDefault :: Message mut
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner mut)
messageDefault Message mut
msg = (Struct mut
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner mut
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'export'params'newtype_ (Struct mut
 -> RealmGateway'export'params
      internalRef externalRef internalOwner externalOwner mut)
-> m (Struct mut)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner 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 (RealmGateway'export'params internalRef externalRef internalOwner externalOwner msg)) where
    fromPtr :: Message msg
-> Maybe (Ptr msg)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner msg)
fromPtr Message msg
msg Maybe (Ptr msg)
ptr = (Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
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
<$> (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 (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    toPtr :: Message ('Mut s)
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner ('Mut s)
-> m (Maybe (Ptr ('Mut s)))
toPtr Message ('Mut s)
msg (RealmGateway'export'params'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 (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    new :: Message ('Mut s)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner ('Mut s))
new Message ('Mut s)
msg = (Struct ('Mut s)
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner ('Mut s)
forall internalRef externalRef internalOwner externalOwner
       (msg :: Mutability).
Struct msg
-> RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner msg
RealmGateway'export'params'newtype_ (Struct ('Mut s)
 -> RealmGateway'export'params
      internalRef externalRef internalOwner externalOwner ('Mut s))
-> m (Struct ('Mut s))
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner ('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
2))
instance (Basics.ListElem mut (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut)) where
    newtype List mut (RealmGateway'export'params internalRef externalRef internalOwner externalOwner mut)
        = RealmGateway'export'params'List_ (Untyped.ListOf mut (Untyped.Struct mut))
    listFromPtr :: Message mut
-> Maybe (Ptr mut)
-> m (List
        mut
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner mut))
listFromPtr Message mut
msg Maybe (Ptr mut)
ptr = (ListOf mut (Struct mut)
-> List
     mut
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner mut)
forall (mut :: Mutability) internalRef externalRef internalOwner
       externalOwner.
ListOf mut (Struct mut)
-> List
     mut
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner mut)
RealmGateway'export'params'List_ (ListOf mut (Struct mut)
 -> List
      mut
      (RealmGateway'export'params
         internalRef externalRef internalOwner externalOwner mut))
-> m (ListOf mut (Struct mut))
-> m (List
        mut
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner 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
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner mut)
-> List mut
toUntypedList (RealmGateway'export'params'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
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner mut)
-> Int
length (RealmGateway'export'params'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
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner mut)
-> m (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner mut)
index Int
i (RealmGateway'export'params'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 (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner 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 (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s))) where
    setIndex :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Int
-> List
     ('Mut s)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner ('Mut s))
-> m ()
setIndex (RealmGateway'export'params'newtype_ Struct ('Mut s)
elt) Int
i (RealmGateway'export'params'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)
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner ('Mut s)))
newList Message ('Mut s)
msg Int
len = (ListOf ('Mut s) (Struct ('Mut s))
-> List
     ('Mut s)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner ('Mut s))
forall (mut :: Mutability) internalRef externalRef internalOwner
       externalOwner.
ListOf mut (Struct mut)
-> List
     mut
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner mut)
RealmGateway'export'params'List_ (ListOf ('Mut s) (Struct ('Mut s))
 -> List
      ('Mut s)
      (RealmGateway'export'params
         internalRef externalRef internalOwner externalOwner ('Mut s)))
-> m (ListOf ('Mut s) (Struct ('Mut s)))
-> m (List
        ('Mut s)
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner ('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
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 :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
0 Struct msg
struct)
    (Message msg
-> Maybe (Ptr msg) -> m (Persistent internalRef internalOwner 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_RealmGateway'export'params'cap :: ((Untyped.RWCtx m s)
                                      ,(Classes.ToPtr s (Persistent internalRef internalOwner (Message.Mut s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent internalRef internalOwner (Message.Mut s)) -> (m ())
set_RealmGateway'export'params'cap :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent internalRef internalOwner ('Mut s) -> m ()
set_RealmGateway'export'params'cap (RealmGateway'export'params'newtype_ Struct ('Mut s)
struct) Persistent internalRef internalOwner ('Mut s)
value = (do
    Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Persistent internalRef internalOwner ('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) Persistent internalRef internalOwner ('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_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 :: Mutability).
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 :: Mutability).
ReadCtx m msg =>
Int -> Struct msg -> m (Maybe (Ptr msg))
Untyped.getPtr Int
1 Struct msg
struct)
    (Message msg
-> Maybe (Ptr msg)
-> m (Persistent'SaveParams externalRef externalOwner 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_RealmGateway'export'params'params :: ((Untyped.RWCtx m s)
                                         ,(Classes.ToPtr s (Persistent'SaveParams externalRef externalOwner (Message.Mut s)))) => (RealmGateway'export'params internalRef externalRef internalOwner externalOwner (Message.Mut s)) -> (Persistent'SaveParams externalRef externalOwner (Message.Mut s)) -> (m ())
set_RealmGateway'export'params'params :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent'SaveParams externalRef externalOwner ('Mut s) -> m ()
set_RealmGateway'export'params'params (RealmGateway'export'params'newtype_ Struct ('Mut s)
struct) Persistent'SaveParams externalRef externalOwner ('Mut s)
value = (do
    Maybe (Ptr ('Mut s))
ptr <- (Message ('Mut s)
-> Persistent'SaveParams externalRef externalOwner ('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) Persistent'SaveParams externalRef externalOwner ('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_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 :: Mutability).
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.Mut s)) -> (m (Persistent'SaveParams externalRef externalOwner (Message.Mut s)))
new_RealmGateway'export'params'params :: RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> m (Persistent'SaveParams externalRef externalOwner ('Mut s))
new_RealmGateway'export'params'params RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
struct = (do
    Persistent'SaveParams externalRef externalOwner ('Mut s)
result <- (Message ('Mut s)
-> m (Persistent'SaveParams externalRef externalOwner ('Mut s))
forall s e (m :: * -> *).
(Allocate s e, WriteCtx m s) =>
Message ('Mut s) -> m e
Classes.new (RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Message ('Mut s)
forall a (mut :: Mutability). HasMessage a mut => a -> Message mut
Untyped.message RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
struct))
    (RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent'SaveParams externalRef externalOwner ('Mut s) -> m ()
forall (m :: * -> *) s externalRef externalOwner internalRef
       internalOwner.
(RWCtx m s,
 ToPtr
   s (Persistent'SaveParams externalRef externalOwner ('Mut s))) =>
RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
-> Persistent'SaveParams externalRef externalOwner ('Mut s) -> m ()
set_RealmGateway'export'params'params RealmGateway'export'params
  internalRef externalRef internalOwner externalOwner ('Mut s)
struct Persistent'SaveParams externalRef externalOwner ('Mut s)
result)
    (Persistent'SaveParams externalRef externalOwner ('Mut s)
-> m (Persistent'SaveParams externalRef externalOwner ('Mut s))
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure Persistent'SaveParams externalRef externalOwner ('Mut s)
result)
    )