add comment noting when we can remove a hack
authorSimon Marlow <marlowsd@gmail.com>
Fri, 11 Nov 2011 10:48:33 +0000 (10:48 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 11 Nov 2011 12:49:49 +0000 (12:49 +0000)
compiler/main/DriverPipeline.hs

index 8037cfb..8c0f3a6 100644 (file)
@@ -138,7 +138,8 @@ compile' (nothingCompiler, interactiveCompiler, batchCompiler)
   -- This is needed when we try to compile the .hc file later, if it
   -- imports a _stub.h file that we created here.
    let current_dir = case takeDirectory basename of
-                     "" -> "." -- XXX Hack
+                     "" -> "." -- XXX Hack required for filepath-1.1 and earlier
+                               -- (GHC 6.12 and earlier)
                      d -> d
        old_paths   = includePaths dflags0
        dflags      = dflags0 { includePaths = current_dir : old_paths }
@@ -839,8 +840,9 @@ runPhase (Hsc src_flavour) input_fn dflags0
   -- the .hs files resides) to the include path, since this is
   -- what gcc does, and it's probably what you want.
         let current_dir = case takeDirectory basename of
-                      "" -> "." -- XXX Hack
-                      d -> d
+                     "" -> "." -- XXX Hack required for filepath-1.1 and earlier
+                               -- (GHC 6.12 and earlier)
+                     d -> d
 
             paths = includePaths dflags0
             dflags = dflags0 { includePaths = current_dir : paths }