[Haskell-beginners] "sleep" in Haskell
Lorcan McDonald
lorcan.mcdonald at gmail.com
Thu Oct 15 04:03:31 EDT 2009
Hi,
I was looking at something similar recently and I found the examples
in the hmidi package to be useful for this.
cabal install hmidi
and the examples are in
~/.cabal/packages/hackage.haskell.org/hmidi/0.1/hmidi-0.1.tar.gz (on
Mac OS X)
On Thu, Oct 15, 2009 at 8:49 AM, Magnus Therning <magnus at therning.org> wrote:
> On Thu, Oct 15, 2009 at 12:20 AM, aditya siram <aditya.siram at gmail.com> wrote:
>> Look here:
>> http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html#v:threadDelay
>>
>> Here is a sample function that delays for 3 seconds and then dies:
>> main :: IO ()
>> main = do
>> threadDelay 30000
>> return ()
>
> Sorry, but I can't help myself... the above is equivalent to
>
> main :: IO ()
> main = threadDelay 3000
>
> /M
>
> --
> Magnus Therning (OpenPGP: 0xAB4DFBA4)
> magnus@therning.org Jabber: magnus@therning.org
> http://therning.org/magnus identi.ca|twitter: magthe
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
More information about the Beginners
mailing list