I want to conditionally compile a function based on the target platform. I have several versions:
linux :: Q Dec
linux = [d|f = f in f|]
windows :: Q Dec
windows = [d|f = f in f|]
-- and so on
I want to splice only the correct version into the top-level of this file. What's the best way to check from the Q
monad which platform GHC is targeting? Is stuff like the Cabal project file available to TH in a non-hacky way?