 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'
+newtype Rank = MkRank { rankId :: CInt -- ^ Extract numeric value of the 'Rank'
                       }
    deriving (Eq, Ord, Enum, Integral, Real)
 

{-| 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)



-- | Map arbitrary 'Enum' value to 'Rank'
toRank :: Enum a => a -> Rank
toRank x = MkRank { rankId = cIntConv (fromEnum x) }

-- | Map 'Rank' to arbitrary 'Enum'
fromRank :: Enum a => Rank -> a
fromRank = toEnum . cIntConv . rankId

type MPIRequest = {# type MPI_Request #}
{-| Haskell representation of the @MPI_Request@ type. Returned by
