Projects / cpphs

cpphs

cpphs is a more liberal re-implementation of cpp, the C pre-processor, in Haskell. The C pre-processor is widely used in Haskell source code, but a true cpp is often unavailable on some systems (such as native Windows), and the common cpp provided by the gcc 3.x series has become more strictly tied to the C language, in subtle ways that are incompatible with Haskell's syntax. This includes problems with, for instance, string gaps, and prime characters in identifiers. This project provides a robust alternative to cpp that is more compatible with Haskell and can be distributed with compilers.

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  26 Dec 2007 14:18

Release Notes: This release fixes some more obscure corner cases involving parameterised macro expansion within conditionals. Internal refactoring affecting parts of the library API has been performed.

  •  18 Oct 2005 10:28

Release Notes: This release now includes a compatibility script for command line arguments to match the original cpp. There are several minor bugfixes, e.g. quotes around replacements for special macros like __FILE__, etc. Interaction with preprocessors like hsc2hs is also improved: if they allow non-cpp directives like #def, these are now passed through to the output with a warning to stderr, rather than halting with an error. Likewise, a #! line in a shell script is now ignored.

  •  17 May 2005 09:53

Release Notes: This release fixes a bug introduced by changes in the ghc-6.4 compiler. Output buffers are now explicitly flushed before cpphs terminates.

  •  14 Nov 2004 06:05

Release Notes: This release adds the "--text" option to cpphs, allowing it to be used on any free-form text file, so it is no longer tied to the more strict lexical formatting of C or Haskell source code. This means, for instance, that macros are expanded even if they seem to occur inside a comment block, or inside a string.

  •  01 Sep 2004 10:53

Release Notes: This release adds support for the special textual replacements __FILE__, __LINE__, __DATE__, and __TIME__.

Screenshot

Project Spotlight

Dada Mail

A simple, Web-based mailing list manager.

Screenshot

Project Spotlight

Yioop!

A distributed PHP search engine and crawler.