    {-# LANGUAGE UnliftedFFITypes #-}
    {-# LANGUAGE ForeignFunctionInterface #-}
    {-# LANGUAGE MagicHash #-}
    module System.Metrics.ThreadId
        ( myCapability
        ) where

    import qualified Control.Concurrent as Concurrent

    myCapability :: IO Int
    myCapability :: IO Int
    myCapability = (Int -> IO Int
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Int -> IO Int) -> ((Int, Bool) -> Int) -> (Int, Bool) -> IO Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int, Bool) -> Int
    forall a b. (a, b) -> a
    fst) ((Int, Bool) -> IO Int) -> IO (Int, Bool) -> IO Int
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<< ThreadId -> IO (Int, Bool)
    Concurrent.threadCapability (ThreadId -> IO (Int, Bool)) -> IO ThreadId -> IO (Int, Bool)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
    =<<
                   IO ThreadId
    Concurrent.myThreadId