Fix compilation warning about Monoid

This commit is contained in:
Tissevert 2020-12-08 19:32:57 +01:00
parent cbd6800938
commit 82fcaac8f0
3 changed files with 23 additions and 13 deletions

View File

@ -1,5 +1,10 @@
# Revision history for SJW # 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 ## 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 * Fix bug in loop reporting causing in some cases the display of an inaccurate loop instead of the one actually detected

View File

@ -3,7 +3,7 @@ cabal-version: >=1.10
-- further documentation, see http://haskell.org/cabal/users-guide/ -- further documentation, see http://haskell.org/cabal/users-guide/
name: SJW 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. synopsis: The Simple Javascript Wrench is a very simple tool to pack several JS «modules» into a single script.
-- description: -- description:
homepage: https://git.marvid.fr/Tissevert/SJW homepage: https://git.marvid.fr/Tissevert/SJW
@ -25,14 +25,16 @@ library
, SJW.Module.File , SJW.Module.File
, SJW.Module.Imports , SJW.Module.Imports
, SJW.Source , SJW.Source
build-depends: attoparsec build-depends: attoparsec >= 0.13.2 && < 0.14
, base >=4.9 && <4.15 , base >=4.9 && <4.15
, containers , containers >= 0.6.0 && < 0.7
, directory , directory >= 1.3.3 && < 1.4
, filepath , filepath >= 1.4.2 && < 1.5
, mtl , mtl >= 2.2.2 && < 2.3
, text , random >= 1.1 && < 1.3
, unix , text >= 1.2.3 && < 1.3
, time >= 1.9.0 && < 1.12
, unix >= 2.7.2 && < 2.8
hs-source-dirs: src hs-source-dirs: src
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall ghc-options: -Wall
@ -41,18 +43,18 @@ executable sjw
main-is: src/Main.hs main-is: src/Main.hs
other-modules: Paths_SJW other-modules: Paths_SJW
-- other-extensions: -- other-extensions:
build-depends: attoparsec build-depends: attoparsec >= 0.13.2 && < 0.14
, base >=4.9 && <4.15 , base >=4.9 && <4.15
, optparse-applicative , optparse-applicative >= 0.15 && < 0.17
, SJW , SJW
, text , text >= 1.2.3 && < 1.3
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall ghc-options: -Wall
benchmark big-src benchmark big-src
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: benchmark/Main.hs main-is: benchmark/Main.hs
build-depends: base >= 4.9 && <4.15 build-depends: base
, directory , directory
, filepath , filepath
, random , random
@ -64,7 +66,7 @@ benchmark big-src
test-suite tests test-suite tests
type: detailed-0.9 type: detailed-0.9
test-module: Tests test-module: Tests
build-depends: base >=4.11 && <4.13 build-depends: base
, Cabal , Cabal
, directory , directory
, filepath , filepath

View File

@ -1,8 +1,11 @@
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE CPP #-}
module Main where module Main where
import Control.Applicative (many, optional) import Control.Applicative (many, optional)
#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>)) import Data.Monoid ((<>))
#endif
import qualified Data.Text as Text (unpack) import qualified Data.Text as Text (unpack)
import Data.Version (showVersion) import Data.Version (showVersion)
import Options.Applicative ( import Options.Applicative (