made function pointer example as a cabal package. modularization