haskell-gi-base-0.26.9: Foundation for libraries generated by haskell-gi

Safe Haskell | None
Language | Haskell2010

Data.GI.Base.Constructible

Description

`Constructible` types are those for which `new` is defined. Often these are `GObject`s, but it is possible to construct new (zero-initialized) structures and unions too.

Synopsis

- class Constructible a (tag :: AttrOpTag) where
  - new :: MonadIO m => (ManagedPtr a -> a) -> [AttrOp a tag] -> m a

# Documentation

class Constructible a (tag :: AttrOpTag) where Source #

Constructible types, i.e. those which can be allocated by `new`.

Methods

new :: MonadIO m => (ManagedPtr a -> a) -> [AttrOp a tag] -> m a Source #

Allocate a new instance of the given type, with the given attributes.

#### Instances

Instances details

(GObject a, tag ~ 'AttrConstruct) => Constructible a tag Source # | Default instance, assuming we have a `GObject`.
Instance details Defined in Data.GI.Base.Constructible Methods new :: MonadIO m => (ManagedPtr a -> a) -> [AttrOp a tag] -> m a Source #