packages feed

cpphs 1.20.8 → 1.20.9

raw patch · 3 files changed

+16/−10 lines, 3 filesdep +timedep −old-localedep −old-timedep ~basedep ~polyparsePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: time

Dependencies removed: old-locale, old-time

Dependency ranges changed: base, polyparse

API changes (from Hackage documentation)

- Language.Preprocessor.Cpphs: Cmd :: (Maybe HashDefine) -> WordStyle
+ Language.Preprocessor.Cpphs: Cmd :: Maybe HashDefine -> WordStyle
- Language.Preprocessor.Cpphs: Pn :: String -> !Int -> !Int -> (Maybe Posn) -> Posn
+ Language.Preprocessor.Cpphs: Pn :: String -> !Int -> !Int -> Maybe Posn -> Posn

Files

Language/Preprocessor/Cpphs/MacroPass.hs view
@@ -29,8 +29,10 @@ import Language.Preprocessor.Cpphs.Options    (BoolOptions(..)) import System.IO.Unsafe (unsafeInterleaveIO) import Control.Monad    ((=<<))-import System.Time       (getClockTime, toCalendarTime, formatCalendarTime)-import System.Locale     (defaultTimeLocale)+--import System.Time       (getClockTime, toCalendarTime, formatCalendarTime)+--import System.Locale     (defaultTimeLocale)+import Data.Time.Clock  (getCurrentTime)+import Data.Time.Format (formatTime, defaultTimeLocale)  noPos :: Posn noPos = newfile "preDefined"@@ -132,12 +134,16 @@       "__FILE__" -> emit (show (filename p))$ macroProcess pr layout lang st ws       "__LINE__" -> emit (show (lineno p))  $ macroProcess pr layout lang st ws       "__DATE__" -> do w <- return .-                            formatCalendarTime defaultTimeLocale "\"%d %b %Y\""-                            =<< toCalendarTime =<< getClockTime+                         -- formatCalendarTime defaultTimeLocale "\"%d %b %Y\""+                         -- =<< toCalendarTime =<< getClockTime+                            formatTime defaultTimeLocale "\"%d %b %Y\""+                            =<< getCurrentTime                        emit w $ macroProcess pr layout lang st ws       "__TIME__" -> do w <- return .-                            formatCalendarTime defaultTimeLocale "\"%H:%M:%S\""-                            =<< toCalendarTime =<< getClockTime+                         -- formatCalendarTime defaultTimeLocale "\"%H:%M:%S\""+                         -- =<< toCalendarTime =<< getClockTime+                            formatTime defaultTimeLocale "\"%H:%M:%S\""+                            =<< getCurrentTime                        emit w $ macroProcess pr layout lang st ws       _ ->         case lookupST x st of
cpphs.cabal view
@@ -1,5 +1,5 @@ Name: cpphs-Version: 1.20.8+Version: 1.20.9 Copyright: 2004-2017, Malcolm Wallace License: LGPL License-File: LICENCE-LGPL@@ -24,7 +24,7 @@ Extra-Source-Files: README, LICENCE-GPL, LICENCE-commercial, CHANGELOG, docs/cpphs.1, docs/index.html  Library-    Build-Depends: base>3&&<6, old-locale, old-time, directory, polyparse>=1.9+    Build-Depends: base>3&&<6, time, directory, polyparse>=1.9     Exposed-Modules:         Language.Preprocessor.Cpphs         Language.Preprocessor.Unlit@@ -40,7 +40,7 @@         Language.Preprocessor.Cpphs.Tokenise  Executable cpphs-    Build-Depends: base>3&&<6, old-locale, old-time, directory, polyparse>=1.9+    Build-Depends: base>3&&<6, time, directory, polyparse>=1.9     Main-Is: cpphs.hs     Other-Modules:         Language.Preprocessor.Cpphs
cpphs.hs view
@@ -21,7 +21,7 @@ import Data.List   ( isPrefixOf )  version :: String-version = "1.20.8"+version = "1.20.9"  main :: IO () main = do