dumb cabal question
Donald Bruce Stewart
dons at cse.unsw.edu.au
Mon Sep 5 03:20:32 EDT 2005
Sven.Panne:
> Am Montag, 5. September 2005 08:13 schrieb Frederik Eaton:
> > On Sun, Sep 04, 2005 at 08:01:48PM -0700, Isaac Jones wrote:
> > > The reason to combine them is that the point of abstraction between
> > > the compilers / interpreters lives in areas like "preprocess this
> > > file", "build this file", "install this library", not in operations
> > > like you mentioned:
> >
> > I mentioned the second two of those, but not the first one.
> > Preprocessing files, however, doesn't sound like an operation that
> > needs to be done in a compiler/interpreter-specific way.
> > [...]
>
> At least in a restricted sense it i*is* compiler/interpreter-specific, because
> one has to #define some magic things like __HUGS__, __GLASGOW_HASKELL__, etc.
> to get conditional compilation right.
Which reminds me, 'runhaskell Setup.hs haddock' doesn't seem to generate
output for code inside #if defined(__GLASGOW_HASKELL__). Poking around
in the source I see:
Distribution.PreProcess:
hcDefines :: Compiler -> [String]
hcDefines Compiler { compilerFlavor=NHC, compilerVersion=version }
= ["-D__NHC__=" ++ versionInt version]
hcDefines Compiler { compilerFlavor=Hugs }
= ["-D__HUGS__"]
hcDefines _ = []
Which seems to be missing a case?
-- Don
More information about the Libraries
mailing list