Fix build with cabal-install 1.18
Add test case for mapAccumL bug