{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.TreePath
    ( 
    TreePath(..)                            ,
 
#if defined(ENABLE_OVERLOADING)
    ResolveTreePathMethod                   ,
#endif
#if defined(ENABLE_OVERLOADING)
    TreePathAppendIndexMethodInfo           ,
#endif
    treePathAppendIndex                     ,
#if defined(ENABLE_OVERLOADING)
    TreePathCompareMethodInfo               ,
#endif
    treePathCompare                         ,
#if defined(ENABLE_OVERLOADING)
    TreePathCopyMethodInfo                  ,
#endif
    treePathCopy                            ,
#if defined(ENABLE_OVERLOADING)
    TreePathDownMethodInfo                  ,
#endif
    treePathDown                            ,
#if defined(ENABLE_OVERLOADING)
    TreePathFreeMethodInfo                  ,
#endif
    treePathFree                            ,
#if defined(ENABLE_OVERLOADING)
    TreePathGetDepthMethodInfo              ,
#endif
    treePathGetDepth                        ,
#if defined(ENABLE_OVERLOADING)
    TreePathGetIndicesMethodInfo            ,
#endif
    treePathGetIndices                      ,
#if defined(ENABLE_OVERLOADING)
    TreePathIsAncestorMethodInfo            ,
#endif
    treePathIsAncestor                      ,
#if defined(ENABLE_OVERLOADING)
    TreePathIsDescendantMethodInfo          ,
#endif
    treePathIsDescendant                    ,
    treePathNew                             ,
    treePathNewFirst                        ,
    treePathNewFromIndices                  ,
    treePathNewFromString                   ,
#if defined(ENABLE_OVERLOADING)
    TreePathNextMethodInfo                  ,
#endif
    treePathNext                            ,
#if defined(ENABLE_OVERLOADING)
    TreePathPrependIndexMethodInfo          ,
#endif
    treePathPrependIndex                    ,
#if defined(ENABLE_OVERLOADING)
    TreePathPrevMethodInfo                  ,
#endif
    treePathPrev                            ,
#if defined(ENABLE_OVERLOADING)
    TreePathToStringMethodInfo              ,
#endif
    treePathToString                        ,
#if defined(ENABLE_OVERLOADING)
    TreePathUpMethodInfo                    ,
#endif
    treePathUp                              ,
    ) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
newtype TreePath = TreePath (SP.ManagedPtr TreePath)
    deriving (TreePath -> TreePath -> Bool
(TreePath -> TreePath -> Bool)
-> (TreePath -> TreePath -> Bool) -> Eq TreePath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TreePath -> TreePath -> Bool
== :: TreePath -> TreePath -> Bool
$c/= :: TreePath -> TreePath -> Bool
/= :: TreePath -> TreePath -> Bool
Eq)
instance SP.ManagedPtrNewtype TreePath where
    toManagedPtr :: TreePath -> ManagedPtr TreePath
toManagedPtr (TreePath ManagedPtr TreePath
p) = ManagedPtr TreePath
p
foreign import ccall "gtk_tree_path_get_type" c_gtk_tree_path_get_type :: 
    IO GType
type instance O.ParentTypes TreePath = '[]
instance O.HasParentTypes TreePath
instance B.Types.TypedObject TreePath where
    glibType :: IO GType
glibType = IO GType
c_gtk_tree_path_get_type
instance B.Types.GBoxed TreePath
instance B.GValue.IsGValue (Maybe TreePath) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_tree_path_get_type
    gvalueSet_ :: Ptr GValue -> Maybe TreePath -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TreePath
P.Nothing = Ptr GValue -> Ptr TreePath -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr TreePath
forall a. Ptr a
FP.nullPtr :: FP.Ptr TreePath)
    gvalueSet_ Ptr GValue
gv (P.Just TreePath
obj) = TreePath -> (Ptr TreePath -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TreePath
obj (Ptr GValue -> Ptr TreePath -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe TreePath)
gvalueGet_ Ptr GValue
gv = do
        Ptr TreePath
ptr <- Ptr GValue -> IO (Ptr TreePath)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr TreePath)
        if Ptr TreePath
ptr Ptr TreePath -> Ptr TreePath -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr TreePath
forall a. Ptr a
FP.nullPtr
        then TreePath -> Maybe TreePath
forall a. a -> Maybe a
P.Just (TreePath -> Maybe TreePath) -> IO TreePath -> IO (Maybe TreePath)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr TreePath -> TreePath
TreePath Ptr TreePath
ptr
        else Maybe TreePath -> IO (Maybe TreePath)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreePath
forall a. Maybe a
P.Nothing
        
    
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TreePath
type instance O.AttributeList TreePath = TreePathAttributeList
type TreePathAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_path_new" gtk_tree_path_new :: 
    IO (Ptr TreePath)
treePathNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m TreePath
    
treePathNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m TreePath
treePathNew  = IO TreePath -> m TreePath
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreePath -> m TreePath) -> IO TreePath -> m TreePath
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
result <- IO (Ptr TreePath)
gtk_tree_path_new
    Text -> Ptr TreePath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treePathNew" Ptr TreePath
result
    TreePath
result' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
TreePath) Ptr TreePath
result
    TreePath -> IO TreePath
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_path_new_first" gtk_tree_path_new_first :: 
    IO (Ptr TreePath)
treePathNewFirst ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m TreePath
    
treePathNewFirst :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m TreePath
treePathNewFirst  = IO TreePath -> m TreePath
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreePath -> m TreePath) -> IO TreePath -> m TreePath
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
result <- IO (Ptr TreePath)
gtk_tree_path_new_first
    Text -> Ptr TreePath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treePathNewFirst" Ptr TreePath
result
    TreePath
result' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
TreePath) Ptr TreePath
result
    TreePath -> IO TreePath
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_path_new_from_indicesv" gtk_tree_path_new_from_indicesv :: 
    Ptr Int32 ->                            
    Word64 ->                               
    IO (Ptr TreePath)
treePathNewFromIndices ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Int32]
    
    -> m TreePath
    
treePathNewFromIndices :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[Int32] -> m TreePath
treePathNewFromIndices [Int32]
indices = IO TreePath -> m TreePath
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreePath -> m TreePath) -> IO TreePath -> m TreePath
forall a b. (a -> b) -> a -> b
$ do
    let length_ :: Word64
length_ = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Int32]
indices
    Ptr Int32
indices' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
indices
    Ptr TreePath
result <- Ptr Int32 -> Word64 -> IO (Ptr TreePath)
gtk_tree_path_new_from_indicesv Ptr Int32
indices' Word64
length_
    Text -> Ptr TreePath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treePathNewFromIndices" Ptr TreePath
result
    TreePath
result' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
TreePath) Ptr TreePath
result
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
indices'
    TreePath -> IO TreePath
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_path_new_from_string" gtk_tree_path_new_from_string :: 
    CString ->                              
    IO (Ptr TreePath)
treePathNewFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    
    -> m (Maybe TreePath)
    
treePathNewFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m (Maybe TreePath)
treePathNewFromString Text
path = IO (Maybe TreePath) -> m (Maybe TreePath)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreePath) -> m (Maybe TreePath))
-> IO (Maybe TreePath) -> m (Maybe TreePath)
forall a b. (a -> b) -> a -> b
$ do
    CString
path' <- Text -> IO CString
textToCString Text
path
    Ptr TreePath
result <- CString -> IO (Ptr TreePath)
gtk_tree_path_new_from_string CString
path'
    Maybe TreePath
maybeResult <- Ptr TreePath
-> (Ptr TreePath -> IO TreePath) -> IO (Maybe TreePath)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreePath
result ((Ptr TreePath -> IO TreePath) -> IO (Maybe TreePath))
-> (Ptr TreePath -> IO TreePath) -> IO (Maybe TreePath)
forall a b. (a -> b) -> a -> b
$ \Ptr TreePath
result' -> do
        TreePath
result'' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
TreePath) Ptr TreePath
result'
        TreePath -> IO TreePath
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result''
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    Maybe TreePath -> IO (Maybe TreePath)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreePath
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_path_append_index" gtk_tree_path_append_index :: 
    Ptr TreePath ->                         
    Int32 ->                                
    IO ()
treePathAppendIndex ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> Int32
    
    -> m ()
treePathAppendIndex :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> Int32 -> m ()
treePathAppendIndex TreePath
path Int32
index_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath -> Int32 -> IO ()
gtk_tree_path_append_index Ptr TreePath
path' Int32
index_
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreePathAppendIndexMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.OverloadedMethod TreePathAppendIndexMethodInfo TreePath signature where
    overloadedMethod = treePathAppendIndex
instance O.OverloadedMethodInfo TreePathAppendIndexMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathAppendIndex",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathAppendIndex"
        })
#endif
foreign import ccall "gtk_tree_path_compare" gtk_tree_path_compare :: 
    Ptr TreePath ->                         
    Ptr TreePath ->                         
    IO Int32
treePathCompare ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> TreePath
    
    -> m Int32
    
treePathCompare :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> TreePath -> m Int32
treePathCompare TreePath
a TreePath
b = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
a' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
a
    Ptr TreePath
b' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
b
    Int32
result <- Ptr TreePath -> Ptr TreePath -> IO Int32
gtk_tree_path_compare Ptr TreePath
a' Ptr TreePath
b'
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
a
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
b
    Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TreePathCompareMethodInfo
instance (signature ~ (TreePath -> m Int32), MonadIO m) => O.OverloadedMethod TreePathCompareMethodInfo TreePath signature where
    overloadedMethod = treePathCompare
instance O.OverloadedMethodInfo TreePathCompareMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathCompare",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathCompare"
        })
#endif
foreign import ccall "gtk_tree_path_copy" gtk_tree_path_copy :: 
    Ptr TreePath ->                         
    IO (Ptr TreePath)
treePathCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m TreePath
    
treePathCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> m TreePath
treePathCopy TreePath
path = IO TreePath -> m TreePath
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreePath -> m TreePath) -> IO TreePath -> m TreePath
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath
result <- Ptr TreePath -> IO (Ptr TreePath)
gtk_tree_path_copy Ptr TreePath
path'
    Text -> Ptr TreePath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treePathCopy" Ptr TreePath
result
    TreePath
result' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
TreePath) Ptr TreePath
result
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    TreePath -> IO TreePath
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result'
#if defined(ENABLE_OVERLOADING)
data TreePathCopyMethodInfo
instance (signature ~ (m TreePath), MonadIO m) => O.OverloadedMethod TreePathCopyMethodInfo TreePath signature where
    overloadedMethod = treePathCopy
instance O.OverloadedMethodInfo TreePathCopyMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathCopy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathCopy"
        })
#endif
foreign import ccall "gtk_tree_path_down" gtk_tree_path_down :: 
    Ptr TreePath ->                         
    IO ()
treePathDown ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m ()
treePathDown :: forall (m :: * -> *). (HasCallStack, MonadIO m) => TreePath -> m ()
treePathDown TreePath
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath -> IO ()
gtk_tree_path_down Ptr TreePath
path'
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreePathDownMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod TreePathDownMethodInfo TreePath signature where
    overloadedMethod = treePathDown
instance O.OverloadedMethodInfo TreePathDownMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathDown",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathDown"
        })
#endif
foreign import ccall "gtk_tree_path_free" gtk_tree_path_free :: 
    Ptr TreePath ->                         
    IO ()
treePathFree ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m ()
treePathFree :: forall (m :: * -> *). (HasCallStack, MonadIO m) => TreePath -> m ()
treePathFree TreePath
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath -> IO ()
gtk_tree_path_free Ptr TreePath
path'
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreePathFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod TreePathFreeMethodInfo TreePath signature where
    overloadedMethod = treePathFree
instance O.OverloadedMethodInfo TreePathFreeMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathFree",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathFree"
        })
#endif
foreign import ccall "gtk_tree_path_get_depth" gtk_tree_path_get_depth :: 
    Ptr TreePath ->                         
    IO Int32
treePathGetDepth ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m Int32
    
treePathGetDepth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> m Int32
treePathGetDepth TreePath
path = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Int32
result <- Ptr TreePath -> IO Int32
gtk_tree_path_get_depth Ptr TreePath
path'
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TreePathGetDepthMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.OverloadedMethod TreePathGetDepthMethodInfo TreePath signature where
    overloadedMethod = treePathGetDepth
instance O.OverloadedMethodInfo TreePathGetDepthMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathGetDepth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathGetDepth"
        })
#endif
foreign import ccall "gtk_tree_path_get_indices_with_depth" gtk_tree_path_get_indices_with_depth :: 
    Ptr TreePath ->                         
    Ptr Int32 ->                            
    IO (Ptr Int32)
treePathGetIndices ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m (Maybe [Int32])
    
    
treePathGetIndices :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> m (Maybe [Int32])
treePathGetIndices TreePath
path = IO (Maybe [Int32]) -> m (Maybe [Int32])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Int32]) -> m (Maybe [Int32]))
-> IO (Maybe [Int32]) -> m (Maybe [Int32])
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr Int32
depth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
result <- Ptr TreePath -> Ptr Int32 -> IO (Ptr Int32)
gtk_tree_path_get_indices_with_depth Ptr TreePath
path' Ptr Int32
depth
    Int32
depth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
depth
    Maybe [Int32]
maybeResult <- Ptr Int32 -> (Ptr Int32 -> IO [Int32]) -> IO (Maybe [Int32])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Int32
result ((Ptr Int32 -> IO [Int32]) -> IO (Maybe [Int32]))
-> (Ptr Int32 -> IO [Int32]) -> IO (Maybe [Int32])
forall a b. (a -> b) -> a -> b
$ \Ptr Int32
result' -> do
        [Int32]
result'' <- (Int32 -> Ptr Int32 -> IO [Int32]
forall a b. (Integral a, Storable b) => a -> Ptr b -> IO [b]
unpackStorableArrayWithLength Int32
depth') Ptr Int32
result'
        [Int32] -> IO [Int32]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Int32]
result''
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
depth
    Maybe [Int32] -> IO (Maybe [Int32])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Int32]
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreePathGetIndicesMethodInfo
instance (signature ~ (m (Maybe [Int32])), MonadIO m) => O.OverloadedMethod TreePathGetIndicesMethodInfo TreePath signature where
    overloadedMethod = treePathGetIndices
instance O.OverloadedMethodInfo TreePathGetIndicesMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathGetIndices",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathGetIndices"
        })
#endif
foreign import ccall "gtk_tree_path_is_ancestor" gtk_tree_path_is_ancestor :: 
    Ptr TreePath ->                         
    Ptr TreePath ->                         
    IO CInt
treePathIsAncestor ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> TreePath
    
    -> m Bool
    
treePathIsAncestor :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> TreePath -> m Bool
treePathIsAncestor TreePath
path TreePath
descendant = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath
descendant' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
descendant
    CInt
result <- Ptr TreePath -> Ptr TreePath -> IO CInt
gtk_tree_path_is_ancestor Ptr TreePath
path' Ptr TreePath
descendant'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
descendant
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreePathIsAncestorMethodInfo
instance (signature ~ (TreePath -> m Bool), MonadIO m) => O.OverloadedMethod TreePathIsAncestorMethodInfo TreePath signature where
    overloadedMethod = treePathIsAncestor
instance O.OverloadedMethodInfo TreePathIsAncestorMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathIsAncestor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathIsAncestor"
        })
#endif
foreign import ccall "gtk_tree_path_is_descendant" gtk_tree_path_is_descendant :: 
    Ptr TreePath ->                         
    Ptr TreePath ->                         
    IO CInt
treePathIsDescendant ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> TreePath
    
    -> m Bool
    
treePathIsDescendant :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> TreePath -> m Bool
treePathIsDescendant TreePath
path TreePath
ancestor = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath
ancestor' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
ancestor
    CInt
result <- Ptr TreePath -> Ptr TreePath -> IO CInt
gtk_tree_path_is_descendant Ptr TreePath
path' Ptr TreePath
ancestor'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
ancestor
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreePathIsDescendantMethodInfo
instance (signature ~ (TreePath -> m Bool), MonadIO m) => O.OverloadedMethod TreePathIsDescendantMethodInfo TreePath signature where
    overloadedMethod = treePathIsDescendant
instance O.OverloadedMethodInfo TreePathIsDescendantMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathIsDescendant",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathIsDescendant"
        })
#endif
foreign import ccall "gtk_tree_path_next" gtk_tree_path_next :: 
    Ptr TreePath ->                         
    IO ()
treePathNext ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m ()
treePathNext :: forall (m :: * -> *). (HasCallStack, MonadIO m) => TreePath -> m ()
treePathNext TreePath
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath -> IO ()
gtk_tree_path_next Ptr TreePath
path'
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreePathNextMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod TreePathNextMethodInfo TreePath signature where
    overloadedMethod = treePathNext
instance O.OverloadedMethodInfo TreePathNextMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathNext",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathNext"
        })
#endif
foreign import ccall "gtk_tree_path_prepend_index" gtk_tree_path_prepend_index :: 
    Ptr TreePath ->                         
    Int32 ->                                
    IO ()
treePathPrependIndex ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> Int32
    
    -> m ()
treePathPrependIndex :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> Int32 -> m ()
treePathPrependIndex TreePath
path Int32
index_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreePath -> Int32 -> IO ()
gtk_tree_path_prepend_index Ptr TreePath
path' Int32
index_
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreePathPrependIndexMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m) => O.OverloadedMethod TreePathPrependIndexMethodInfo TreePath signature where
    overloadedMethod = treePathPrependIndex
instance O.OverloadedMethodInfo TreePathPrependIndexMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathPrependIndex",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathPrependIndex"
        })
#endif
foreign import ccall "gtk_tree_path_prev" gtk_tree_path_prev :: 
    Ptr TreePath ->                         
    IO CInt
treePathPrev ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m Bool
    
    
treePathPrev :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> m Bool
treePathPrev TreePath
path = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    CInt
result <- Ptr TreePath -> IO CInt
gtk_tree_path_prev Ptr TreePath
path'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreePathPrevMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod TreePathPrevMethodInfo TreePath signature where
    overloadedMethod = treePathPrev
instance O.OverloadedMethodInfo TreePathPrevMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathPrev",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathPrev"
        })
#endif
foreign import ccall "gtk_tree_path_to_string" gtk_tree_path_to_string :: 
    Ptr TreePath ->                         
    IO CString
treePathToString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m (Maybe T.Text)
    
treePathToString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> m (Maybe Text)
treePathToString TreePath
path = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    CString
result <- Ptr TreePath -> IO CString
gtk_tree_path_to_string Ptr TreePath
path'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
        Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreePathToStringMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod TreePathToStringMethodInfo TreePath signature where
    overloadedMethod = treePathToString
instance O.OverloadedMethodInfo TreePathToStringMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathToString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathToString"
        })
#endif
foreign import ccall "gtk_tree_path_up" gtk_tree_path_up :: 
    Ptr TreePath ->                         
    IO CInt
treePathUp ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    TreePath
    
    -> m Bool
    
treePathUp :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreePath -> m Bool
treePathUp TreePath
path = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    CInt
result <- Ptr TreePath -> IO CInt
gtk_tree_path_up Ptr TreePath
path'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreePathUpMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod TreePathUpMethodInfo TreePath signature where
    overloadedMethod = treePathUp
instance O.OverloadedMethodInfo TreePathUpMethodInfo TreePath where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Structs.TreePath.treePathUp",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Structs-TreePath.html#v:treePathUp"
        })
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTreePathMethod (t :: Symbol) (o :: *) :: * where
    ResolveTreePathMethod "appendIndex" o = TreePathAppendIndexMethodInfo
    ResolveTreePathMethod "compare" o = TreePathCompareMethodInfo
    ResolveTreePathMethod "copy" o = TreePathCopyMethodInfo
    ResolveTreePathMethod "down" o = TreePathDownMethodInfo
    ResolveTreePathMethod "free" o = TreePathFreeMethodInfo
    ResolveTreePathMethod "isAncestor" o = TreePathIsAncestorMethodInfo
    ResolveTreePathMethod "isDescendant" o = TreePathIsDescendantMethodInfo
    ResolveTreePathMethod "next" o = TreePathNextMethodInfo
    ResolveTreePathMethod "prependIndex" o = TreePathPrependIndexMethodInfo
    ResolveTreePathMethod "prev" o = TreePathPrevMethodInfo
    ResolveTreePathMethod "toString" o = TreePathToStringMethodInfo
    ResolveTreePathMethod "up" o = TreePathUpMethodInfo
    ResolveTreePathMethod "getDepth" o = TreePathGetDepthMethodInfo
    ResolveTreePathMethod "getIndices" o = TreePathGetIndicesMethodInfo
    ResolveTreePathMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreePathMethod t TreePath, O.OverloadedMethod info TreePath p) => OL.IsLabel t (TreePath -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTreePathMethod t TreePath, O.OverloadedMethod info TreePath p, R.HasField t TreePath p) => R.HasField t TreePath p where
    getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTreePathMethod t TreePath, O.OverloadedMethodInfo info TreePath) => OL.IsLabel t (O.MethodProxy info TreePath) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif
#endif