From 82fcaac8f05ef5a15ca786a25973204342e76e97 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Tue, 8 Dec 2020 19:32:57 +0100 Subject: [PATCH] Fix compilation warning about Monoid --- CHANGELOG.md | 5 +++++ SJW.cabal | 28 +++++++++++++++------------- src/Main.hs | 3 +++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8e15bd..8ba113d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Revision history for SJW +## 0.1.2.2 -- 2020-12-08 + +* Add tests and a benchmark +* Fix compilation warning about Monoid + ## 0.1.2.1 -- 2020-05-21 * Fix bug in loop reporting causing in some cases the display of an inaccurate loop instead of the one actually detected diff --git a/SJW.cabal b/SJW.cabal index 339cb71..abaca3a 100644 --- a/SJW.cabal +++ b/SJW.cabal @@ -3,7 +3,7 @@ cabal-version: >=1.10 -- further documentation, see http://haskell.org/cabal/users-guide/ name: SJW -version: 0.1.2.1 +version: 0.1.2.2 synopsis: The Simple Javascript Wrench is a very simple tool to pack several JS «modules» into a single script. -- description: homepage: https://git.marvid.fr/Tissevert/SJW @@ -25,14 +25,16 @@ library , SJW.Module.File , SJW.Module.Imports , SJW.Source - build-depends: attoparsec + build-depends: attoparsec >= 0.13.2 && < 0.14 , base >=4.9 && <4.15 - , containers - , directory - , filepath - , mtl - , text - , unix + , containers >= 0.6.0 && < 0.7 + , directory >= 1.3.3 && < 1.4 + , filepath >= 1.4.2 && < 1.5 + , mtl >= 2.2.2 && < 2.3 + , random >= 1.1 && < 1.3 + , text >= 1.2.3 && < 1.3 + , time >= 1.9.0 && < 1.12 + , unix >= 2.7.2 && < 2.8 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall @@ -41,18 +43,18 @@ executable sjw main-is: src/Main.hs other-modules: Paths_SJW -- other-extensions: - build-depends: attoparsec + build-depends: attoparsec >= 0.13.2 && < 0.14 , base >=4.9 && <4.15 - , optparse-applicative + , optparse-applicative >= 0.15 && < 0.17 , SJW - , text + , text >= 1.2.3 && < 1.3 default-language: Haskell2010 ghc-options: -Wall benchmark big-src type: exitcode-stdio-1.0 main-is: benchmark/Main.hs - build-depends: base >= 4.9 && <4.15 + build-depends: base , directory , filepath , random @@ -64,7 +66,7 @@ benchmark big-src test-suite tests type: detailed-0.9 test-module: Tests - build-depends: base >=4.11 && <4.13 + build-depends: base , Cabal , directory , filepath diff --git a/src/Main.hs b/src/Main.hs index 0bbb519..25aab3f 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,8 +1,11 @@ {-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE CPP #-} module Main where import Control.Applicative (many, optional) +#if !MIN_VERSION_base(4,11,0) import Data.Monoid ((<>)) +#endif import qualified Data.Text as Text (unpack) import Data.Version (showVersion) import Options.Applicative (