I have a problem. I wrote a big Haskell program, and it always works with small input. Now, when I want to test it and generate a bigger input, I always get the message:
You may want to take a look at Haskell Wiki - Debugging, which contains many useful approaches to your problem.
One promising tool is LocH, which would would help you locate the head invocation in your code which triggered the empty list error.
Personally, I recommend the safe package, which allows to annotate most partial functions from the Prelude (and thus leads to a more conscious use of those partial functions) or better yet, use the total variants of functions such as head which always return a result (if the input value was defined at least).