@vu3rdd I did some changes, now main.hs looks more readable. Next I will try to put my thread-design related code to the master.
I went through one article on stack, and as far as I understood it tries to do a global package installation and re-use those packages in a 'sandbox'.
I have been doing something similar myself. I have removed the cabal.config from functorrent and have a global cabal.config of stackage. And I am doing a global package installation even for functorrent.