         {# call caps_get_structure #} caps (fromIntegral index) >>=
             maybePeek peekStructure
 
+-- | Returns a new 'Caps' containing only the 'Structure' at the given
+--   index of the caps.
+capsCopyNth :: Caps
+            -> Word
+            -> Maybe Caps
+capsCopyNth caps index =
+    unsafePerformIO $
+        {# call caps_copy_nth #} caps (fromIntegral index) >>=
+            maybePeek takeCaps
+
+-- | Returns 'True' if the caps represents no media formats.
 capsIsEmpty :: Caps
             -> Bool
 capsIsEmpty caps =
     toBool $ unsafePerformIO $
         {# call caps_is_empty #} caps
 
+-- | Returns 'True' if the caps is fixed.
 capsIsFixed :: Caps
             -> Bool
 capsIsFixed caps =
     toBool $ unsafePerformIO $
         {# call caps_is_fixed #} caps
 
+-- | Returns 'True' if the caps represent the same set of capabilities.
 capsIsEqual :: Caps
             -> Caps
             -> Bool

instance Eq Caps where
    (==) = capsIsEqual

capsIsEqualFixed :: Caps
                 -> Caps
                 -> Bool

marshalCapsModify mkCaps (CapsM action) =
    unsafePerformIO $
        do ptr <- mkCaps
           result <- runReaderT action ptr
           caps <- takeCaps ptr
           return (caps, result)

-- | Create a caps and mutate it according to the given action.
capsCreate :: CapsM a
           -> (Caps, a)
capsCreate action =
