
Is the failure of hsc2hs to support this directive just a matter of "not implemented right now", maybe by lack of importance? Or is there a fundamental problem?
See also: https://ghc.haskell.org/trac/ghc/ticket/9689 One would probably have to implement a C string literal parser to do this properly.
If fixing hsc2hs is hard, could the 'directory' package perhaps choose another way to implement this function?
Can you try this workaround?
diff --git a/System/Directory/Internal.hsc b/System/Directory/Internal.hsc
index a0a71db..0f9b71f 100644
--- a/System/Directory/Internal.hsc
+++ b/System/Directory/Internal.hsc
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+##include