 peekCast = peek . castPtr
 
 
-{-
-This module provides Haskell datatype that represents values which
-could be used as MPI tags.
--}
-
-newtype Tag = MkTag { tagVal :: Int }
+{-| Haskell datatype that represents values which could be used as
+tags for point-to-point transfers.
+-}
+newtype Tag = MkTag { tagVal :: Int -- ^ Extract numeric value of the Tag
+                    }
    deriving (Eq, Ord, Enum, Integral, Real)
 
 instance Num Tag where

-- | A tag with unit value. Intended to be used as a convenient default.
unitTag :: Tag
unitTag = toTag ()


{-
This module provides Haskell datatypes that comprises of values of
predefined MPI constants @MPI_THREAD_SINGLE@, @MPI_THREAD_FUNNELED@,
@MPI_THREAD_SERIALIZED@, @MPI_THREAD_MULTIPLE@.
-}

{- | Constants used to describe the required level of multithreading
   support in call to 'initThread'. They also describe provided level

bxorOp = MkOperation <$> unsafePerformIO $ peek bxorOp_


{- | Haskell datatype that represents values which
 could be used as MPI rank designations. Low-level MPI calls require
 that you use 32-bit non-negative integer values as ranks, so any
 non-numeric Haskell Ranks should provide a sensible instances of
 'Enum'.

Attempt to supply a value that does not fit into 32 bits will cause a
run-time 'error'.
-}
newtype Rank = MkRank { rankId :: Int -- ^ Extract numeric value of the 'Rank'
                      }
   deriving (Eq, Ord, Enum, Integral, Real)

instance Num Rank where
