Code created learning haskell threads, MVars and TVars