When you have a big scary-looking typechecking error, you can (temporarily) wrap parts of your code in (myexpression :: MyType) to explicitly state to the compiler which type you're expecting myexpression to have. This will often help the compiler give you better error messages.