get_head for haskell