There are a few platform-specific libraries in Hackage that I'd like to use (e.g. inotify, kqueue). However, documentation on how to switch between platforms using conditional compilation seems a little bit sparse. I'm having some trouble finding the relevant docs...
Which preprocessor definitions can I use to switch between platforms?
How can I set up my cabal file to include/exclude inotify/kqueue on linux/osx respectively?
I hope that having it documented here might be useful for others too, so it may be worthwhile to mention other common platforms. It's silly to look for this stuff all over the place.