leksah 0.15.0.2 → 0.15.0.3
raw patch · 3 files changed
+38/−16 lines, 3 filesdep ~leksahPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: leksah
API changes (from Hackage documentation)
Files
- leksah.cabal +4/−4
- src/IDE/ImportTool.hs +30/−8
- src/IDE/Pane/PackageEditor.hs +4/−4
leksah.cabal view
@@ -1,5 +1,5 @@ name: leksah-version: 0.15.0.2+version: 0.15.0.3 cabal-version: >=1.18 build-type: Simple license: GPL@@ -296,7 +296,7 @@ ghc-options: -threaded hs-source-dirs: main- build-depends: leksah == 0.15.0.2,+ build-depends: leksah == 0.15.0.3, base >= 4.0.0.0 && <=4.9, gtk3 >=0.13.2 && <0.14 if os(linux) && flag(loc)@@ -312,7 +312,7 @@ ghc-options: -rtsopts -fwarn-missing-fields -fwarn-incomplete-patterns -ferror-spans executable bewleksah- build-depends: leksah ==0.15.0.2,+ build-depends: leksah ==0.15.0.3, base >=4.0.0.0 && <=4.9, jsaddle -any, ghcjs-dom -any,@@ -331,7 +331,7 @@ build-depends: base >=4.0.0.0 && <4.9, Cabal >=1.10.2.0 && <1.23, QuickCheck >=2.4.2 && <2.9,- leksah ==0.15.0.2,+ leksah ==0.15.0.3, containers, ltk, leksah-server,
src/IDE/ImportTool.hs view
@@ -60,8 +60,9 @@ (anyVersion, orLaterVersion, intersectVersionRanges, earlierVersion, Version(..)) import Distribution.PackageDescription- (CondTree(..), condExecutables, condLibrary, packageDescription,- buildDepends)+ (GenericPackageDescription(..), Benchmark(..), TestSuite(..),+ Executable(..), BuildInfo(..), Library(..), CondTree(..),+ condExecutables, condLibrary, packageDescription, buildDepends) import Distribution.PackageDescription.Configuration (flattenPackageDescription) import IDE.BufferMode (editInsertCode)@@ -185,14 +186,34 @@ liftIO $ writeGenericPackageDescription (ipdCabalFile $ idePackage) gpd { condLibrary = addDepToLib pack (condLibrary gpd), condExecutables = map (addDepToExe pack)- (condExecutables gpd)}+ (condExecutables gpd),+ condTestSuites = map (addDepToTest pack)+ (condTestSuites gpd),+ condBenchmarks = map (addDepToBenchmark pack)+ (condBenchmarks gpd)} return True where addDepToLib _ Nothing = Nothing- addDepToLib p (Just cn@CondNode{condTreeConstraints = deps}) =- Just (cn{condTreeConstraints = dep p : deps})- addDepToExe p (str,cn@CondNode{condTreeConstraints = deps}) =- (str,cn{condTreeConstraints = dep p : deps})+ addDepToLib p (Just cn@CondNode{+ condTreeConstraints = deps,+ condTreeData = lib@Library{libBuildInfo = bi}}) = Just (cn{+ condTreeConstraints = deps <> [dep p],+ condTreeData = lib {libBuildInfo = bi {targetBuildDepends = targetBuildDepends bi <> [dep p]}}})+ addDepToExe p (str,cn@CondNode{+ condTreeConstraints = deps,+ condTreeData = exe@Executable{buildInfo = bi}}) = (str,cn{+ condTreeConstraints = deps <> [dep p],+ condTreeData = exe { buildInfo = bi {targetBuildDepends = targetBuildDepends bi <> [dep p]}}})+ addDepToTest p (str,cn@CondNode{+ condTreeConstraints = deps,+ condTreeData = test@TestSuite{testBuildInfo = bi}}) = (str,cn{+ condTreeConstraints = deps <> [dep p],+ condTreeData = test { testBuildInfo = bi {targetBuildDepends = targetBuildDepends bi <> [dep p]}}})+ addDepToBenchmark p (str,cn@CondNode{+ condTreeConstraints = deps,+ condTreeData = bm@Benchmark{benchmarkBuildInfo = bi}}) = (str,cn{+ condTreeConstraints = deps <> [dep p],+ condTreeData = bm { benchmarkBuildInfo = bi {targetBuildDepends = targetBuildDepends bi <> [dep p]}}}) -- Empty version is probably only going to happen for ghc-prim dep p | null . versionBranch $ packageVersion p = Dependency (packageName p) (anyVersion) dep p = Dependency (packageName p) (@@ -468,7 +489,8 @@ whiteSpace symbol "It is a member of the hidden package " (char '`' <|> char '‛' <|> char '‘')- pack <- T.pack <$> many (noneOf "'’")+ pack <- T.pack <$> many (noneOf "'’@")+ many (noneOf "'’") (char '\'' <|> char '’') symbol ".\n" many anyChar
src/IDE/Pane/PackageEditor.hs view
@@ -143,22 +143,22 @@ where buildCondTreeLibrary lib = CondNode {- condTreeData = lib,+ condTreeData = lib { libBuildInfo = (libBuildInfo lib) { targetBuildDepends = buildDepends pd } }, condTreeConstraints = buildDepends pd, condTreeComponents = []} buildCondTreeExe exe = (exeName exe, CondNode {- condTreeData = exe,+ condTreeData = exe { buildInfo = (buildInfo exe) { targetBuildDepends = buildDepends pd } }, condTreeConstraints = buildDepends pd, condTreeComponents = []}) buildCondTreeTest test = (testName test, CondNode {- condTreeData = test,+ condTreeData = test { testBuildInfo = (testBuildInfo test) { targetBuildDepends = buildDepends pd } }, condTreeConstraints = buildDepends pd, condTreeComponents = []}) buildCondTreeBenchmark bm = (benchmarkName bm, CondNode {- condTreeData = bm,+ condTreeData = bm { benchmarkBuildInfo = (benchmarkBuildInfo bm) { targetBuildDepends = buildDepends pd } }, condTreeConstraints = buildDepends pd, condTreeComponents = []})