> It is complining but as soon as I want to run it , I see this message : 

> Non-exhaustive patterns in function acc 

Yep, Maybe has two constructors, and you are only handling one. You should handle the Nothing case as well.