After installing HGL through cabal I had the following runtime error when trying to execute the example or any other hello world HGL program:
user error (loadQueryFont)
I solved it by installing all xorg-x11-fonts* packages with the distribution's package manager. This happened on Fedora 21. I'm posting it here in case someone else runs into the same problem.