https://wiki.haskell.org/Debugging has some useful tips for debugging in general.