"Eric Y. Kow" <[EMAIL PROTECTED]> writes:
> On Mon, Aug 13, 2007 at 11:01:47 +0100, Dave Love wrote:
>> I suspect it should be asked about in GHC land if no-one here knows
>> what's going on.
>
> I suspect it's a question of whitespace in that the cpp translates
>
> -------------8<----------
> #ifdef FOO
> {-# INCLUDE "bar.h" #-}
> #endif
> --------------------------
>
> into
>
> -------------8<----------
>
> {-# INCLUDE "bar.h" #-}
>
> --------------------------
>
> ...which gets ignored for similar reasons as to why it got ignored when
> you put comments on top. I can't tell if (for some reason) it's
> actually *supposed* to behave like that (pragmas must literally be at
> the top, no whitespace!) or if it's a minor bug.
No, it makes no sense and I baulked at investigating further... If I
keep the tmp files from a compilation of External.hs which produces
the warnings, I get a preprocessed file that (indented) starts
# 1 "src/Darcs/External.hs"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "src/Darcs/External.hs"
{-# OPTIONS -fffi #-}
{-# INCLUDE <termio.h> #-}
{-# INCLUDE <curses.h> #-}
{-# INCLUDE <term.h> #-}
-- The termio bit above is a grim hack for Solaris 10 (at least).
and if I then compile that by using the ghc command line from the
makefile, but without -cpp, it compiles without warnings because the
.hc file starts
/* GHC_PACKAGES haskell98 unix-1.0 html-1.0 parsec-2.0 mtl-1.0 QuickCheck-1.0
re
gex-compat-0.71 regex-posix-0.71 regex-base-0.71 base rts
*/
#include "Stg.h"
#include "HsBase.h"
#include "HsUnix.h"
#include <termio.h>
#include <curses.h>
#include <term.h>
EI_(base_GHCziBase_Czh_static_info);
static StgWord r6P2_closure[] = {
(W_)&base_GHCziBase_Czh_static_info, 0x2fU
};
I can only assume that the environment of the compilation stages is
being affected by the normal ghc command.
> My google-skills fail me on this one. Would you be willing to follow up
> on this with the GHC folks?
I could do, but I don't know where off-hand, and I assume the relevant
lists are closed. I was hoping someone on -devel was subscribed to
the relevant place and could pursue it.
_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel