[Yhc] buildbot failure in macosx_x86

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Jun 4 13:57:31 EDT 2007


> Basically, runCpphs no longer takes options in the same way it once
> did - but now uses a proper options structure.

Yes, it was a big cleanup to merge separate options-processing bits from
four different modules.  I think it is an improvement.

> Malcolm: Can we have defaultCpphsOptions :: CpphsOptions in Cpphs, so
> that we can set the fields we need, and rely on appropriate defaults
> for everything else?

Done.

> > cpphs :: Flags -> FilePath -> String -> IO String
> > cpphs flags filename contents = runCpphs opts filename contents
> >       where
> >           opts = CpphsStrip : CpphsAnsi : map CpphsMacro macros
> >           macros = [("__HASKELL__","98"), ("__HASKELL_98__", "1"), ("__HASKELL98__", "1"), ("__YHC__", "1")]

Should now become

cpphs :: Flags -> FilePath -> String -> IO String
cpphs flags filename contents = runCpphs opts filename contents
  where
    opts = defaultCpphsOptions { defines  = yhcMacros
                               , boolopts = defaultBoolOpts { ansi=True
                                                            , strip=True } }
    yhcMacros = [ ("__HASKELL__","98"), ("__HASKELL_98__", "1")
                , ("__HASKELL98__", "1"), ("__YHC__", "1")]

Regards,
    Malcolm


More information about the Yhc mailing list