call main from Haskell