Skip to content

Instantly share code, notes, and snippets.

@mwotton
Created May 11, 2018 00:41
Show Gist options
  • Save mwotton/2b0e9fec705ef3d89d38d8a2b5149799 to your computer and use it in GitHub Desktop.
Save mwotton/2b0e9fec705ef3d89d38d8a2b5149799 to your computer and use it in GitHub Desktop.
et ➜ ~ stack ghc test3.hs
[1 of 1] Compiling Main ( test3.hs, test3.o )
Linking test3 ...
set ➜ ~ ./test3 &
[1] 23291
set ➜ ~ kill 23291
[1] + 23291 terminated ./test3
set ➜ ~ cat test3.hs
import Control.Exception.Safe
import Control.Concurrent
main :: IO ()
main = bracket (return ()) (\_ -> putStrLn "come to collect") (\_ -> threadDelay 30000000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment