buildwrapper 0.7.4 → 0.7.5
raw patch · 4 files changed
+10/−6 lines, 4 filesdep ~haskell-src-extsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: haskell-src-exts
API changes (from Hackage documentation)
Files
- buildwrapper.cabal +3/−3
- src/Language/Haskell/BuildWrapper/GHC.hs +1/−1
- src/Language/Haskell/BuildWrapper/Src.hs +5/−1
- test/Language/Haskell/BuildWrapper/ImportsTests.hs +1/−1
buildwrapper.cabal view
@@ -1,5 +1,5 @@ name: buildwrapper-version: 0.7.4+version: 0.7.5 cabal-version: >= 1.8 build-type: Simple license: BSD3@@ -32,7 +32,7 @@ text, containers, vector >= 0.8,- haskell-src-exts,+ haskell-src-exts >= 1.12 && <1.15, cpphs, old-time, aeson >=0.4,@@ -71,7 +71,7 @@ mtl, ghc, cpphs,- haskell-src-exts,+ haskell-src-exts >= 1.12 && <1.15, old-time, ghc-paths, vector >= 0.8,
src/Language/Haskell/BuildWrapper/GHC.hs view
@@ -1360,7 +1360,7 @@ szQualified2=if ideclQualified imp then 10 else szQualified szPkg2=maybe szPkg (\p->max szPkg (3 + lengthFS p)) $ ideclPkgQual imp L _ mo=ideclName imp- szName2=max szName (1 + lengthFS (moduleNameFS mo))+ szName2=maybe szName (\_->max szName (1 + lengthFS (moduleNameFS mo))) $ ideclAs imp szAs2=maybe szAs (\m->max szAs (3 + lengthFS (moduleNameFS m))) $ ideclAs imp in (szSafe2,szQualified2,szPkg2,szName2,szAs2) formatImport :: (Int,Int,Int,Int,Int)-> FinalImportValue -> ImportClean
src/Language/Haskell/BuildWrapper/Src.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TypeSynonymInstances,OverloadedStrings #-} +{-# LANGUAGE TypeSynonymInstances,OverloadedStrings,CPP #-} -- | -- Module : Language.Haskell.BuildWrapper.Src -- Copyright : (c) JP Moresmau 2011 @@ -38,7 +38,11 @@ _ -> [] optionsPragmas = [ optionsPragma | S.OptionsPragma _ _ optionsPragma <- topPragmas ] optionsFromPragmas = concatMap words optionsPragmas +#if MIN_VERSION_haskell_src_exts(1,14,0) + exts=EnableExtension MultiParamTypeClasses : EnableExtension PatternGuards : (map (\x->classifyExtension $ if "-X" `isPrefixOf` x then tail $ tail x else x) $ options ++ optionsFromPragmas) +#else exts=MultiParamTypeClasses : PatternGuards : (map (\x->classifyExtension $ if "-X" `isPrefixOf` x then tail $ tail x else x) $ options ++ optionsFromPragmas) +#endif extsFull=if "-fglasgow-exts" `elem` options ++ optionsFromPragmas then exts ++ glasgowExts else exts
test/Language/Haskell/BuildWrapper/ImportsTests.hs view
@@ -303,7 +303,7 @@ (ics,ns)<-cleanImports api root rel True assertBool $ null ns assertEqual [ImportClean (InFileSpan (InFileLoc 3 1) (InFileLoc 3 23)) - "import System.FilePath ((</>))" + "import System.FilePath ((</>))" ] ics