The timeout package

[ Tags: concurrency, control, library, mit ] [ Propose Tags ]

Generalized sleep and timeout functions

[Skip to Readme]


Versions 0.0.0, 0.1.0, 0.1.1
Change log
Dependencies base (<5), exceptions (>=0.6), mtl, time [details]
License MIT
Copyright 2014 Fedor Gogolev 2013 Selectel
Author Fedor Gogolev <>
Category Concurrency, Control
Home page
Bug tracker
Source repo head: git clone
Uploaded Sat Aug 2 12:36:51 UTC 2014 by FedorGogolev
Distributions NixOS:0.1.1
Downloads 1124 total (17 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for timeout-0.1.1

[back to package description]

timeout Build Status Build Status

Generalized sleep and timeout functions.


module Main where

import Control.Timeout (timeout, sleep)

main :: IO ()
main = do
    timeout 1 $ sleep 2  -- Will return IO Nothing
    timeout 2 $ sleep 1  -- Will return IO (Just ())
    return ()