Disable "Automatic GPU Switching" in System Preferences / Energy Saver.
See: https://groups.google.com/forum/#!topic/haskell-gloss/VKYGVv2gzho
SDL doesn't play nice with template haskell. I found a convoluted solution to the issue on IRC: http://ircbrowse.net/browse/haskell?id=17202052×tamp=1389138999#t1389138999