packages feed

cpphs 1.18.9 → 1.19

raw patch · 8 files changed

+41/−19 lines, 8 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Language.Preprocessor.Cpphs: Cmd :: (Maybe HashDefine) -> WordStyle
+ Language.Preprocessor.Cpphs: Ident :: Posn -> String -> WordStyle
+ Language.Preprocessor.Cpphs: Other :: String -> WordStyle
+ Language.Preprocessor.Cpphs: data WordStyle
+ Language.Preprocessor.Cpphs: runCpphsPass1 :: CpphsOptions -> FilePath -> String -> IO [(Posn, String)]
+ Language.Preprocessor.Cpphs: runCpphsPass2 :: BoolOptions -> [(String, String)] -> FilePath -> [(Posn, String)] -> IO String
+ Language.Preprocessor.Cpphs: tokenise :: Bool -> Bool -> Bool -> Bool -> [(Posn, String)] -> [WordStyle]

Files

CHANGELOG view
@@ -1,6 +1,11 @@+Version 1.19+------------+  * expose more of the cpphs API+  * allow the static linking exception to the LGPL+ Version 1.18 -------------  * better lexing of Template Haskell single quotes (thanks to Stephan Wehr)+  * better lexing of Template Haskell single quotes (thanks to Stefan Wehr)   * (1.18.1): fix incomplete pattern match   * (1.18.2): bugfix for erroneous boolean intepretation of some macro               expansions in #if clauses
Language/Preprocessor/Cpphs.hs view
@@ -12,8 +12,8 @@ -----------------------------------------------------------------------------  module Language.Preprocessor.Cpphs-  ( runCpphs, runCpphsReturningSymTab-  , cppIfdef+  ( runCpphs, runCpphsPass1, runCpphsPass2, runCpphsReturningSymTab+  , cppIfdef, tokenise, WordStyle(..)   , macroPass, macroPassReturningSymTab   , CpphsOptions(..), BoolOptions(..)   , parseOptions, defaultCpphsOptions, defaultBoolOptions@@ -24,8 +24,11 @@ import Language.Preprocessor.Cpphs.MacroPass(macroPass                                             ,macroPassReturningSymTab) import Language.Preprocessor.Cpphs.RunCpphs(runCpphs+                                           ,runCpphsPass1+                                           ,runCpphsPass2                                            ,runCpphsReturningSymTab) import Language.Preprocessor.Cpphs.Options        (CpphsOptions(..), BoolOptions(..), parseOptions        ,defaultCpphsOptions,defaultBoolOptions) import Language.Preprocessor.Cpphs.Position+import Language.Preprocessor.Cpphs.Tokenise
Language/Preprocessor/Cpphs/Position.hs view
@@ -104,4 +104,3 @@ cleanPath [] = [] cleanPath ('\\':cs) = '/': cleanPath cs cleanPath (c:cs)    = c:   cleanPath cs-
Language/Preprocessor/Cpphs/RunCpphs.hs view
@@ -5,6 +5,8 @@ -- This file is LGPL (relicensed from the GPL by Malcolm Wallace, October 2011). -} module Language.Preprocessor.Cpphs.RunCpphs ( runCpphs+                                            , runCpphsPass1+                                            , runCpphsPass2                                             , runCpphsReturningSymTab                                             ) where @@ -13,12 +15,17 @@ import Language.Preprocessor.Cpphs.Options  (CpphsOptions(..), BoolOptions(..)                                             ,trailing) import Language.Preprocessor.Cpphs.Tokenise (deWordStyle, tokenise)-import Language.Preprocessor.Cpphs.Position (cleanPath)+import Language.Preprocessor.Cpphs.Position (cleanPath, Posn) import Language.Preprocessor.Unlit as Unlit (unlit)   runCpphs :: CpphsOptions -> FilePath -> String -> IO String-runCpphs options' filename input = do+runCpphs options filename input = do+  pass1 <- runCpphsPass1 options filename input+  runCpphsPass2 (boolopts options) (defines options) filename pass1++runCpphsPass1 :: CpphsOptions -> FilePath -> String -> IO [(Posn,String)]+runCpphsPass1 options' filename input = do   let options= options'{ includes= map (trailing "\\/") (includes options') }   let bools  = boolopts options       preInc = case preInclude options of@@ -28,7 +35,11 @@    pass1 <- cppIfdef filename (defines options) (includes options) bools                     (preInc++input)-  pass2 <- macroPass (defines options) bools pass1+  return pass1++runCpphsPass2 :: BoolOptions -> [(String,String)] -> FilePath -> [(Posn,String)] -> IO String+runCpphsPass2 bools defines filename pass1 = do+  pass2 <- macroPass defines bools pass1   let result= if not (macros bools)               then if   stripC89 bools || stripEol bools                    then concatMap deWordStyle $@@ -37,7 +48,6 @@                    else unlines (map snd pass1)               else pass2       pass3 = if literate bools then Unlit.unlit filename else id-   return (pass3 result)  runCpphsReturningSymTab :: CpphsOptions -> FilePath -> String
README view
@@ -30,9 +30,7 @@  COPYRIGHT ----------Copyright (c) 2004-2014 Malcolm Wallace (Malcolm.Wallace@me.com)-except for Text.ParserCombinators.HuttonMeijer (Copyright (c) 1995-Graham Hutton and Erik Meijer).+Copyright (c) 2004-2015 Malcolm Wallace (Malcolm.Wallace@me.com)   LICENCE@@ -50,5 +48,5 @@  WEBSITE --------http://haskell.org/cpphs/+http://projects.haskell.org/cpphs/ darcs get http://code.haskell.org/~malcolm/cpphs
cpphs.cabal view
@@ -1,5 +1,5 @@ Name: cpphs-Version: 1.18.9+Version: 1.19 Copyright: 2004-2015, Malcolm Wallace License: LGPL License-File: LICENCE-LGPL
cpphs.hs view
@@ -20,7 +20,7 @@ import Data.List   ( isPrefixOf )  version :: String-version = "1.18.9"+version = "1.19"  main :: IO () main = do
docs/index.html view
@@ -198,11 +198,11 @@ <b>Current stable version:</b>  <p>-cpphs-1.18.9, release date 2015-02-19<br>+cpphs-1.19, release date 2015-03-30<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. <ul>-<li> accept "#if defined foo" as well as "#if defined(foo)"+<li> expose more of the API </ul>  <p>@@ -226,6 +226,14 @@ <b>Older versions:</b>  <p>+cpphs-1.18.9, release date 2015-02-19<br>+By HTTP:+<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>.+<ul>+<li> accept "#if defined foo" as well as "#if defined(foo)"+</ul>++<p> cpphs-1.18.8, release date 2015-01-20<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>.@@ -720,12 +728,11 @@         Malcolm.Wallace@me.com</a>  </ul> -<p><b>Copyright:</b> &copy; 2004-2014 Malcolm Wallace,-except for ParseLib (Copyright &copy; 1995 Graham Hutton and Erik Meijer)+<p><b>Copyright:</b> &copy; 2004-2015 Malcolm Wallace  <p><b>License:</b> The library modules in cpphs are distributed under the terms of the LGPL (see file <a href="LICENCE-LGPL">LICENCE-LGPL</a>-for more details).  If that's a problem for you, contact me to make+for more details), with a special exception for static linking (see file <a href="COPYRIGHT">COPYRIGHT</a>.  If that's a problem for you, contact me to make other arrangements.  The application module 'cpphs.hs' itself is GPL (see file <a href="LICENCE-GPL">LICENCE-GPL</a>).  If you have a commercial use for cpphs and find the terms of the (L)GPL too onerous,