cpphs 1.20.6 → 1.20.7
raw patch · 5 files changed
+26/−11 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG +2/−0
- Language/Preprocessor/Cpphs/ReadFirst.hs +12/−7
- cpphs.cabal +1/−1
- cpphs.hs +1/−1
- docs/index.html +10/−2
CHANGELOG view
@@ -6,6 +6,8 @@ * (1.20.3): detect an absolute windows path with a drive letter in a #include * (1.20.4): more windows path handling * (1.20.5): revert change in 1.20.4+ * (1.20.6): minor bugfix for crash in obscure corner case+ * (1.20.7): bugfix for windows drive letter in #include Version 1.19 ------------
Language/Preprocessor/Cpphs/ReadFirst.hs view
@@ -38,23 +38,28 @@ readFirst name demand path warn = case name of- nm@(c:':':_) -> try nm [""] -- Windows absolute path- '/':nm -> try nm [""]- _ -> try name (cons dd (".":path))+ -- Windows drive in absolute path+ c:':':'/':nm -> try nm (Just (c:':':[])) [""]+ -- Windows drive in relative path+ c:':':nm -> try nm (Just (c:':':[])) (cons dd (".":path))+ -- unix-like absolute path+ '/':nm -> try nm Nothing [""]+ -- any relative path+ _ -> try name Nothing (cons dd (".":path)) where dd = directory demand cons x xs = if null x then xs else x:xs- try name [] = do+ try name _ [] = do when warn $ hPutStrLn stderr ("Warning: Can't find file \""++name ++"\" in directories\n\t" ++concat (intersperse "\n\t" (cons dd (".":path))) ++"\n Asked for by: "++show demand) return ("missing file: "++name,"")- try name (p:ps) = do- let file = cleanPath p++'/':cleanPath name+ try name drive (p:ps) = do+ let file = (maybe id (++) drive) $ cleanPath p++'/':cleanPath name ok <- doesFileExist file- if not ok then try name ps+ if not ok then try name drive ps else do content <- readFileUTF8 file return (file,content)
cpphs.cabal view
@@ -1,5 +1,5 @@ Name: cpphs-Version: 1.20.6+Version: 1.20.7 Copyright: 2004-2017, Malcolm Wallace License: LGPL License-File: LICENCE-LGPL
cpphs.hs view
@@ -21,7 +21,7 @@ import Data.List ( isPrefixOf ) version :: String-version = "1.20.6"+version = "1.20.7" main :: IO () main = do
docs/index.html view
@@ -198,11 +198,11 @@ <b>Current stable version:</b> <p>-cpphs-1.20.6, release date 2017-06-21<br>+cpphs-1.20.7, release date 2017-06-21<br> By HTTP: <a href="http://hackage.haskell.org/package/cpphs">Hackage</a>. <ul>-<li> (1.20.6) minor bugfix to avoid a crash in an obscure corner case+<li> (1.20.7) bugfix for windows drive letters in #includes. </ul> <p>@@ -224,6 +224,14 @@ <p> <b>Older versions:</b>++<p>+cpphs-1.20.7, release date 2017-06-21<br>+By HTTP:+<a href="http://hackage.haskell.org/package/cpphs">Hackage</a>.+<ul>+<li> (1.20.7) bugfix for windows drive letters in #includes.+</ul> <p> cpphs-1.20.6, release date 2017-06-21<br>