cpphs: A liberalised re-implementation of cpp, the C pre-processor.

[ development, library, program ] [ Propose Tags ] [ Report a vulnerability ]

Cpphs is a re-implementation of the C pre-processor that is both more compatible with Haskell, and itself written in Haskell so that it can be distributed with compilers.

This version of the C pre-processor is pretty-much feature-complete and compatible with traditional (K&R) pre-processors. Additional features include: a plain-text mode; an option to unlit literate code files; and an option to turn off macro-expansion.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
old-locale

If true, use old-locale, otherwise use time 1.5 or newer.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 1.3, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.13.1, 1.13.2, 1.13.3, 1.14, 1.15, 1.16, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.18.6, 1.18.7, 1.18.8, 1.18.9, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.20.7, 1.20.8, 1.20.9, 1.20.9.1 (info)
Change log CHANGELOG
Dependencies base (>=4.3 && <5), directory (<1.4), old-locale (>=1.0.0.2 && <1.1), polyparse (>=1.13 && <1.14), time (<1.13) [details]
Tested with ghc ==9.2.1 || ==9.0.1 || ==8.10.7 || ==8.8.4 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2 || ==7.2.2 || ==7.0.4
License LicenseRef-LGPL
Copyright 2004-2017, Malcolm Wallace
Author Malcolm Wallace <Malcolm.Wallace@me.com>
Maintainer Malcolm Wallace <Malcolm.Wallace@me.com>
Revised Revision 1 made by AndreasAbel at 2021-11-02T16:37:47Z
Category Development
Home page http://projects.haskell.org/cpphs/
Bug tracker https://github.com/malcolmwallace/cpphs/issues
Source repo head: git clone https://github.com/hackage-trustees/malcolm-wallace-universe
Uploaded by phadej at 2020-04-02T19:37:23Z
Distributions Arch:1.20.9.1, Debian:1.20.9.1, Fedora:1.20.9.1, FreeBSD:1.19, LTSHaskell:1.20.9.1, NixOS:1.20.9.1, Stackage:1.20.9.1, openSUSE:1.20.9.1
Reverse Dependencies 36 direct, 4268 indirect [details]
Executables cpphs
Downloads 239555 total (193 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-04-02 [all 1 reports]

Readme for cpphs-1.20.9.1

[back to package description]
This directory contains 'cpphs', a simplified but robust
re-implementation of cpp, the C pre-processor, in Haskell.

TO BUILD
--------
Just use
    hmake cpphs [-package base]
or
    ghc --make cpphs [-o cpphs]		#  -o needed for ghc <= 6.4.1 ]
or
    runhugs cpphs	# or rename the script cpphs.hugs to cpphs


USAGE
-----
	cpphs  [filename | -Dsym | -Dsym=val | -Ipath]+  [-Ofile]
               [ --include=file ]*
               [ --nomacro | --noline | --nowarn | --strip | --strip-eol |
                 --pragma | --text | --hashes | --layout | --unlit |
                 --linepragma ]*
               [ --cpp compatopts ]

For fuller details, see docs/index.html

If you want to use cpphs as a completely drop-in replacement for the
real cpp, that is, to accept the same arguments, and have broadly
the same behaviour in response to them, then use the --cpp compatibility
option.


COPYRIGHT
---------
Copyright (c) 2004-2017 Malcolm Wallace (Malcolm.Wallace@me.com)


LICENCE
-------
These library modules are distributed under the terms of the LGPL.
The application module 'cpphs.hs' is GPL.

This software comes with no warranty.  Use at your own risk.

If you have a commercial use for cpphs, and feel the terms of the (L)GPL
are too onerous, you have the option of distributing unmodified binaries
(only, not sources) under the terms of a different licence (see
LICENCE-commercial).


WEBSITE
-------
http://projects.haskell.org/cpphs/
darcs get http://code.haskell.org/~malcolm/cpphs