add haskell code and pthread_cond