ContentsIndex
Network.GnuTLS.Attributes
Portabilityuses MPTC with functional dependencies
Stabilityexperimental
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Attribute classes
Interface for getting, setting and updating attributes
Description
|
Synopsis
class ReadableAttribute a m o d | a -> m, a -> o, a -> d where
getter :: a -> o -> m d
class WritableAttribute a m o d | a -> m, a -> o, a -> d where
setter :: a -> o -> d -> m ()
data AttrOp m o
= forall attr r w . WritableAttribute attr m o w => (:=) attr w
| forall attr r w . (ReadableAttribute attr m o r, WritableAttribute attr m o w) => (:~) attr (r -> w)
| forall attr r w . WritableAttribute attr m o w => (:=>) attr (m w)
| forall attr r w . (ReadableAttribute attr m o r, WritableAttribute attr m o w) => (:~>) attr (r -> m w)
| forall attr r w . WritableAttribute attr m o w => (::=) attr (o -> w)
| forall attr r w . (ReadableAttribute attr m o r, WritableAttribute attr m o w) => (::~) attr (o -> r -> w)
get :: (Monad m, ReadableAttribute attr m o a) => o -> attr -> m a
set :: forall m o . Monad m => o -> [AttrOp m o] -> m ()
newAttr :: (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
readAttr :: (o -> IO a) -> ReadAttr o a
writeAttr :: (o -> b -> IO ()) -> WriteAttr o b
type Attr o a = ReadWriteAttr o a a
type ReadAttr o a = ReadWriteAttr o a ()
type WriteAttr o b = ReadWriteAttr o () b
data ReadWriteAttr o a b
Attribute classes
class ReadableAttribute a m o d | a -> m, a -> o, a -> d where
Methods
getter :: a -> o -> m d
show/hide Instances
class WritableAttribute a m o d | a -> m, a -> o, a -> d where
Methods
setter :: a -> o -> d -> m ()
show/hide Instances
Interface for getting, setting and updating attributes
data AttrOp m o
A set or update operation on an attribute.
Constructors
forall attr r w . WritableAttribute attr m o w => (:=) attr wAssign a value to an attribute.
forall attr r w . (ReadableAttribute attr m o r, WritableAttribute attr m o w) => (:~) attr (r -> w)Apply an update function to an attribute.
forall attr r w . WritableAttribute attr m o w => (:=>) attr (m w)Assign the result of an action to an attribute.
forall attr r w . (ReadableAttribute attr m o r, WritableAttribute attr m o w) => (:~>) attr (r -> m w)Apply a update action to an attribute.
forall attr r w . WritableAttribute attr m o w => (::=) attr (o -> w)Assign a value to an attribute with the object as an argument.
forall attr r w . (ReadableAttribute attr m o r, WritableAttribute attr m o w) => (::~) attr (o -> r -> w)Apply an update function to an attribute with the object as an argument.
get :: (Monad m, ReadableAttribute attr m o a) => o -> attr -> m a
Get an Attr of an object.
set :: forall m o . Monad m => o -> [AttrOp m o] -> m ()
Do a number of attribute set or update operation for some object.
newAttr :: (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
Create a new attribute with a getter and setter function.
readAttr :: (o -> IO a) -> ReadAttr o a
Create a new read-only attribute.
writeAttr :: (o -> b -> IO ()) -> WriteAttr o b
Create a new write-only attribute.
type Attr o a = ReadWriteAttr o a a
An ordinary attribute. Most attributes have the same get and set types.
type ReadAttr o a = ReadWriteAttr o a ()
A read-only attribute.
type WriteAttr o b = ReadWriteAttr o () b
A write-only attribute.
data ReadWriteAttr o a b
A generalised attribute with independent get and set types.
show/hide Instances
Produced by Haddock version 0.8