haskell syntax corrections with grouping