cpphs 1.17.1 → 1.18
raw patch · 9 files changed
+37/−7 lines, 9 files
Files
- CHANGELOG +4/−0
- Language/Preprocessor/Cpphs/Tokenise.hs +7/−2
- Makefile +1/−1
- cpphs.cabal +1/−1
- cpphs.hs +1/−1
- docs/index.html +11/−2
- tests/expect56 +6/−0
- tests/runtests +1/−0
- tests/th +5/−0
CHANGELOG view
@@ -1,3 +1,7 @@+Version 1.18+------------+ * better lexing of Template Haskell single quotes (thanks to Stephan Wehr)+ Version 1.17 ------------ * recursively evaluate #if expressions after macro expansion (fix)
Language/Preprocessor/Cpphs/Tokenise.hs view
@@ -106,8 +106,14 @@ haskell CLineComment " " p ls xs haskell Any acc p ls ('"':xs) = emit acc $ haskell (String '"') ['"'] p ls xs- haskell Any acc p ls ('\'':xs) = emit acc $+ haskell Any acc p ls ('\'':'\'':xs) = emit acc $ -- TH type quote+ haskell Any "''" p ls xs+ haskell Any acc p ls ('\'':xs@('\\':_)) = emit acc $ -- escaped char literal haskell (String '\'') "'" p ls xs+ haskell Any acc p ls ('\'':x:'\'':xs) = emit acc $ -- character literal+ haskell Any ['\'', x, '\''] p ls xs+ haskell Any acc p ls ('\'':xs) = emit acc $ -- TH name quote+ haskell Any "'" p ls xs haskell Any acc p ls (x:xs) | single x = emit acc $ emit [x] $ haskell Any [] p ls xs haskell Any acc p ls (x:xs) | space x = emit acc $@@ -272,4 +278,3 @@ args n w acc (x@(Other _) :xs) = args n (x:w) acc xs args _ _ _ _ = Nothing addone w acc = reverse (skip w): acc-
Makefile view
@@ -1,5 +1,5 @@ LIBRARY = cpphs-VERSION = 1.17.1+VERSION = 1.18 DIRS = Language/Preprocessor/Cpphs \ Text/ParserCombinators
cpphs.cabal view
@@ -1,5 +1,5 @@ Name: cpphs-Version: 1.17.1+Version: 1.18 Copyright: 2004-2013, Malcolm Wallace License: LGPL License-File: LICENCE-LGPL
cpphs.hs view
@@ -20,7 +20,7 @@ import Data.List ( isPrefixOf ) version :: String-version = "1.17.1"+version = "1.18" main :: IO () main = do
docs/index.html view
@@ -198,11 +198,11 @@ <b>Current stable version:</b> <p>-cpphs-1.17.1, release date 2013.08.18<br>+cpphs-1.18, release date 2014.02.04<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. <ul>-<li> (minor) Report the correct version number with <tt>cpphs --version</tt>+<li> Better lexing of Template Haskell single quotes. (Thanks to Stephan Wehr) </ul> <p>@@ -226,6 +226,15 @@ <b>Older versions:</b> +++<p>+cpphs-1.17.1, release date 2013.08.18<br>+By HTTP:+<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>.+<ul>+<li> (minor) Report the correct version number with <tt>cpphs --version</tt>+</ul> <p> cpphs-1.17, release date 2013.08.16<br>
+ tests/expect56 view
@@ -0,0 +1,6 @@+#line 1 "th"++test_b = FOO False+-- This line causes troubles:+SafeCopy.deriveSafeCopy 0 'SafeCopy.base ''Event+test_a = FOO True
tests/runtests view
@@ -73,4 +73,5 @@ runtest "$CPPHS --nomacro --strip-eol nomacro" expect53 runtest "$CPPHS --strip-eol nomacro" expect54 runtest "$CPPHS ballard" expect55+runtest "$CPPHS th" expect56 exit $FAIL
+ tests/th view
@@ -0,0 +1,5 @@+#define assertBool FOO+test_b = assertBool False+-- This line causes troubles:+SafeCopy.deriveSafeCopy 0 'SafeCopy.base ''Event+test_a = assertBool True