Refactor haskell example

Split programm to modules
Add tests
Add Makefile for runnig test #TODO use cabal