Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. fixupCallerAllocates :: Callable -> Callable

    haskell-gi Data.GI.CodeGen.Callable

    caller-allocates arguments are arguments that the caller allocates, and the called function modifies. They are marked as out argumens in the introspection data, we sometimes treat them as inout arguments instead. The semantics are somewhat tricky: for memory management purposes they should be treated as "in" arguments, but from the point of view of the exposed API they should be treated as "out" or "inout". Unfortunately we cannot always just assume that they are purely "out", so in many cases the generated API is somewhat suboptimal (since the initial values are not important): for example for g_io_channel_read_chars the size of the buffer to read is determined by the caller-allocates argument. As a compromise, we assume that we can allocate anything that is not a TCArray of length determined by an argument.

  2. genCCallableWrapper :: Name -> Text -> Callable -> ExcCodeGen ()

    haskell-gi Data.GI.CodeGen.Callable

    Generate a wrapper for a known C symbol.

  3. genDynamicCallableWrapper :: Name -> Text -> Callable -> ExcCodeGen Text

    haskell-gi Data.GI.CodeGen.Callable

    Generate a wrapper for a dynamic C symbol (i.e. a Haskell function that will invoke its first argument, which should be a FunPtr of the appropriate type). The caller should have created a type synonym with the right type for the foreign symbol.

  4. signatureCallable :: Signature -> Callable

    haskell-gi Data.GI.CodeGen.Callable

    No documentation available.

  5. TypeAlloc :: Text -> Int -> TypeAllocInfo

    haskell-gi Data.GI.CodeGen.Conversions

    No documentation available.

  6. data TypeAllocInfo

    haskell-gi Data.GI.CodeGen.Conversions

    Information on how to allocate a type: allocator function and size of the struct.

  7. callableHasClosures :: Callable -> Bool

    haskell-gi Data.GI.CodeGen.Conversions

    Whether the callable has closure arguments (i.e. "user_data" style arguments).

  8. typeAllocInfo :: Type -> CodeGen e (Maybe TypeAllocInfo)

    haskell-gi Data.GI.CodeGen.Conversions

    Information on how to allocate the given type, if known.

  9. typeIsCallback :: Type -> CodeGen e Bool

    haskell-gi Data.GI.CodeGen.Conversions

    Check whether the given type corresponds to a callback.

  10. fixCallbackUserData :: (Name, API) -> (Name, API)

    haskell-gi Data.GI.CodeGen.Fixups

    The last argument of callbacks is often a user_data argument, but currently gobject-introspection does not have an annotation representing this. This is generally OK, since the gir generator will mark these arguments as (closure) if they are named user_data, and we do the right things in this case, but recently there has been a push to "fix" these annotations by removing them without providing any replacement, which breaks the bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/450 Here we try to guess which arguments in callbacks are user_data arguments.

Page 347 of many | Previous | Next