rearranging code in scala folder
added type constructors in haskell