Haskell code, can you spot the bug ?