diff --git a/.ghci b/.ghci deleted file mode 100644 index 5e12675e..00000000 --- a/.ghci +++ /dev/null @@ -1 +0,0 @@ -:set -isrc -itest -idist/build/autogen -DTEST -optP-include -optPdist/build/autogen/cabal_macros.h diff --git a/hpack.cabal b/hpack.cabal index 12416e00..d459d04b 100644 --- a/hpack.cabal +++ b/hpack.cabal @@ -25,6 +25,7 @@ source-repository head library hs-source-dirs: src + default-extensions: BangPatterns ConstrainedClassMethods DeriveDataTypeable DeriveFoldable DeriveFunctor DeriveTraversable ExistentialQuantification ExplicitForAll FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving KindSignatures MultiParamTypeClasses NamedFieldPuns PostfixOperators RankNTypes ScopedTypeVariables StandaloneDeriving TupleSections TypeOperators TypeSynonymInstances DeriveAnyClass DerivingStrategies LambdaCase OverloadedStrings RecordWildCards ViewPatterns DefaultSignatures ghc-options: -Wall build-depends: Cabal >=3.0.0.0 && <3.6 @@ -49,6 +50,24 @@ library , unordered-containers , vector , yaml >=0.10.0 + if impl(ghc >= 8.10) + default-extensions: ImportQualifiedPost StandaloneKindSignatures + if impl(ghc >= 8.6) + default-extensions: NumericUnderscores + if impl(ghc >= 8.4) + default-extensions: EmptyDataDeriving HexFloatLiterals + if impl(ghc >= 8.0) + default-extensions: DeriveLift TypeApplications + if impl(ghc >= 7.10) + default-extensions: BinaryLiterals NamedWildCards + if impl(ghc >= 7.8) + default-extensions: EmptyCase + if impl(ghc >= 7.6) + default-extensions: InstanceSigs + if impl(ghc >= 7.4) + default-extensions: ConstraintKinds PolyKinds + if impl(ghc >= 7.2) + default-extensions: DeriveGeneric GADTSyntax exposed-modules: Hpack Hpack.Config @@ -83,6 +102,7 @@ executable hpack main-is: Main.hs hs-source-dirs: driver + default-extensions: BangPatterns ConstrainedClassMethods DeriveDataTypeable DeriveFoldable DeriveFunctor DeriveTraversable ExistentialQuantification ExplicitForAll FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving KindSignatures MultiParamTypeClasses NamedFieldPuns PostfixOperators RankNTypes ScopedTypeVariables StandaloneDeriving TupleSections TypeOperators TypeSynonymInstances DeriveAnyClass DerivingStrategies LambdaCase OverloadedStrings RecordWildCards ViewPatterns DefaultSignatures ghc-options: -Wall build-depends: Cabal >=3.0.0.0 && <3.6 @@ -108,6 +128,24 @@ executable hpack , unordered-containers , vector , yaml >=0.10.0 + if impl(ghc >= 8.10) + default-extensions: ImportQualifiedPost StandaloneKindSignatures + if impl(ghc >= 8.6) + default-extensions: NumericUnderscores + if impl(ghc >= 8.4) + default-extensions: EmptyDataDeriving HexFloatLiterals + if impl(ghc >= 8.0) + default-extensions: DeriveLift TypeApplications + if impl(ghc >= 7.10) + default-extensions: BinaryLiterals NamedWildCards + if impl(ghc >= 7.8) + default-extensions: EmptyCase + if impl(ghc >= 7.6) + default-extensions: InstanceSigs + if impl(ghc >= 7.4) + default-extensions: ConstraintKinds PolyKinds + if impl(ghc >= 7.2) + default-extensions: DeriveGeneric GADTSyntax other-modules: Paths_hpack default-language: Haskell2010 @@ -118,6 +156,7 @@ test-suite spec hs-source-dirs: test src + default-extensions: BangPatterns ConstrainedClassMethods DeriveDataTypeable DeriveFoldable DeriveFunctor DeriveTraversable ExistentialQuantification ExplicitForAll FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving KindSignatures MultiParamTypeClasses NamedFieldPuns PostfixOperators RankNTypes ScopedTypeVariables StandaloneDeriving TupleSections TypeOperators TypeSynonymInstances DeriveAnyClass DerivingStrategies LambdaCase OverloadedStrings RecordWildCards ViewPatterns DefaultSignatures QuasiQuotes ghc-options: -Wall cpp-options: -DTEST build-depends: @@ -150,6 +189,24 @@ test-suite spec , unordered-containers , vector , yaml >=0.10.0 + if impl(ghc >= 8.10) + default-extensions: ImportQualifiedPost StandaloneKindSignatures + if impl(ghc >= 8.6) + default-extensions: NumericUnderscores + if impl(ghc >= 8.4) + default-extensions: EmptyDataDeriving HexFloatLiterals + if impl(ghc >= 8.0) + default-extensions: DeriveLift TypeApplications + if impl(ghc >= 7.10) + default-extensions: BinaryLiterals NamedWildCards + if impl(ghc >= 7.8) + default-extensions: EmptyCase + if impl(ghc >= 7.6) + default-extensions: InstanceSigs + if impl(ghc >= 7.4) + default-extensions: ConstraintKinds PolyKinds + if impl(ghc >= 7.2) + default-extensions: DeriveGeneric GADTSyntax build-tool-depends: hspec-discover:hspec-discover other-modules: diff --git a/package.yaml b/package.yaml index 6ac03a37..369febb4 100644 --- a/package.yaml +++ b/package.yaml @@ -10,6 +10,17 @@ extra-source-files: ghc-options: -Wall +defaults: sol/ghc2021@v0.1.0 + +default-extensions: + - DeriveAnyClass + - DerivingStrategies + - LambdaCase + - OverloadedStrings + - RecordWildCards + - ViewPatterns + - DefaultSignatures + dependencies: - base >= 4.9 && < 5 - bytestring @@ -64,3 +75,5 @@ tests: - template-haskell - HUnit >= 1.6.0.0 build-tools: hspec-discover + default-extensions: + - QuasiQuotes diff --git a/src/Data/Aeson/Config/FromValue.hs b/src/Data/Aeson/Config/FromValue.hs index e329f114..c4b03e0e 100644 --- a/src/Data/Aeson/Config/FromValue.hs +++ b/src/Data/Aeson/Config/FromValue.hs @@ -1,13 +1,6 @@ -{-# LANGUAGE DefaultSignatures #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} -{-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ConstraintKinds #-} module Data.Aeson.Config.FromValue ( FromValue(..) , Parser diff --git a/src/Data/Aeson/Config/Parser.hs b/src/Data/Aeson/Config/Parser.hs index 741d7eab..1acf4e83 100644 --- a/src/Data/Aeson/Config/Parser.hs +++ b/src/Data/Aeson/Config/Parser.hs @@ -1,6 +1,3 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Data.Aeson.Config.Parser ( Parser @@ -65,7 +62,7 @@ fromAesonPathElement e = case e of Aeson.Index n -> Index n newtype Parser a = Parser {unParser :: WriterT (Set JSONPath) Aeson.Parser a} - deriving (Functor, Applicative, Alternative, Monad, Fail.MonadFail) + deriving newtype (Functor, Applicative, Alternative, Monad, Fail.MonadFail) liftParser :: Aeson.Parser a -> Parser a liftParser = Parser . lift diff --git a/src/Data/Aeson/Config/Types.hs b/src/Data/Aeson/Config/Types.hs index 8fecfe73..89965506 100644 --- a/src/Data/Aeson/Config/Types.hs +++ b/src/Data/Aeson/Config/Types.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE DeriveFoldable #-} -{-# LANGUAGE DeriveTraversable #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Data.Aeson.Config.Types where import Data.Semigroup (Semigroup(..)) @@ -12,7 +8,8 @@ import Data.Bifunctor import Data.Aeson.Config.FromValue newtype List a = List {fromList :: [a]} - deriving (Eq, Show, Functor, Foldable, Traversable, Semigroup, Monoid) + deriving newtype (Eq, Show, Functor, Foldable, Semigroup, Monoid) + deriving (Traversable) instance FromValue a => FromValue (List a) where fromValue v = List <$> case v of diff --git a/src/Hpack.hs b/src/Hpack.hs index ed719b34..712e0fb8 100644 --- a/src/Hpack.hs +++ b/src/Hpack.hs @@ -1,6 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE RecordWildCards #-} module Hpack ( -- | /__NOTE:__/ This module is exposed to allow integration of Hpack into -- other tools. It is not meant for general use by end users. The following diff --git a/src/Hpack/CabalFile.hs b/src/Hpack/CabalFile.hs index feddf99f..1316578c 100644 --- a/src/Hpack/CabalFile.hs +++ b/src/Hpack/CabalFile.hs @@ -1,6 +1,3 @@ -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ViewPatterns #-} module Hpack.CabalFile where import Control.Monad diff --git a/src/Hpack/Config.hs b/src/Hpack/Config.hs index 63deee7e..f4192d83 100644 --- a/src/Hpack/Config.hs +++ b/src/Hpack/Config.hs @@ -1,18 +1,4 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE DeriveFoldable #-} -{-# LANGUAGE DeriveTraversable #-} -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE LiberalTypeSynonyms #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE FlexibleContexts #-} module Hpack.Config ( -- | /__NOTE:__/ This module is exposed to allow integration of Hpack into -- other tools. It is not meant for general use by end users. The following @@ -469,7 +455,8 @@ hasKey _ _ = False newtype Condition = Condition { conditionCondition :: Cond -} deriving (Eq, Show, Generic, FromValue) +} deriving (Eq, Show, Generic) + deriving anyclass FromValue data Cond = CondBool Bool | CondExpression String deriving (Eq, Show) diff --git a/src/Hpack/Defaults.hs b/src/Hpack/Defaults.hs index 896216b3..55edd0f3 100644 --- a/src/Hpack/Defaults.hs +++ b/src/Hpack/Defaults.hs @@ -1,8 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE LambdaCase #-} module Hpack.Defaults ( ensure , Defaults(..) diff --git a/src/Hpack/License.hs b/src/Hpack/License.hs index 0cb0e1de..c365ffbf 100644 --- a/src/Hpack/License.hs +++ b/src/Hpack/License.hs @@ -1,7 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE LambdaCase #-} module Hpack.License where import Control.Arrow ((&&&)) diff --git a/src/Hpack/Module.hs b/src/Hpack/Module.hs index cc849919..a16f27ee 100644 --- a/src/Hpack/Module.hs +++ b/src/Hpack/Module.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE CPP #-} module Hpack.Module ( Module(..) diff --git a/src/Hpack/Options.hs b/src/Hpack/Options.hs index c6d8ebcb..0ffef2fb 100644 --- a/src/Hpack/Options.hs +++ b/src/Hpack/Options.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE LambdaCase #-} module Hpack.Options where import Control.Applicative diff --git a/src/Hpack/Render.hs b/src/Hpack/Render.hs index 2735840d..49ec94b7 100644 --- a/src/Hpack/Render.hs +++ b/src/Hpack/Render.hs @@ -1,7 +1,3 @@ -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE CPP #-} module Hpack.Render ( -- | /__NOTE:__/ This module is exposed to allow integration of Hpack into diff --git a/src/Hpack/Render/Dsl.hs b/src/Hpack/Render/Dsl.hs index 57f2230b..af0a272f 100644 --- a/src/Hpack/Render/Dsl.hs +++ b/src/Hpack/Render/Dsl.hs @@ -1,6 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Hpack.Render.Dsl ( -- * AST Element (..) @@ -44,10 +42,10 @@ data CommaStyle = LeadingCommas | TrailingCommas deriving (Eq, Show) newtype Nesting = Nesting Int - deriving (Eq, Show, Num, Enum) + deriving newtype (Eq, Show, Num, Enum) newtype Alignment = Alignment Int - deriving (Eq, Show, Num) + deriving newtype (Eq, Show, Num) data RenderSettings = RenderSettings { renderSettingsIndentation :: Int diff --git a/src/Hpack/Render/Hints.hs b/src/Hpack/Render/Hints.hs index 46840e2b..917d0d89 100644 --- a/src/Hpack/Render/Hints.hs +++ b/src/Hpack/Render/Hints.hs @@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE ViewPatterns #-} module Hpack.Render.Hints ( FormattingHints (..) , sniffFormattingHints diff --git a/src/Hpack/Syntax/BuildTools.hs b/src/Hpack/Syntax/BuildTools.hs index df6d917e..a75d95de 100644 --- a/src/Hpack/Syntax/BuildTools.hs +++ b/src/Hpack/Syntax/BuildTools.hs @@ -1,6 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE ViewPatterns #-} module Hpack.Syntax.BuildTools ( BuildTools(..) , ParseBuildTool(..) @@ -33,7 +30,7 @@ data ParseBuildTool = QualifiedBuildTool String String | UnqualifiedBuildTool St newtype BuildTools = BuildTools { unBuildTools :: [(ParseBuildTool, DependencyVersion)] -} deriving (Show, Eq, Semigroup, Monoid) +} deriving newtype (Show, Eq, Semigroup, Monoid) instance FromValue BuildTools where fromValue = fmap BuildTools . parseDependencies parse @@ -68,7 +65,7 @@ instance FromValue BuildTools where newtype SystemBuildTools = SystemBuildTools { unSystemBuildTools :: Map String VersionConstraint -} deriving (Show, Eq, Semigroup, Monoid) +} deriving newtype (Show, Eq, Semigroup, Monoid) instance FromValue SystemBuildTools where fromValue = fmap (SystemBuildTools . Map.fromList) . parseDependencies parse diff --git a/src/Hpack/Syntax/Defaults.hs b/src/Hpack/Syntax/Defaults.hs index d134cfdc..3a6e5560 100644 --- a/src/Hpack/Syntax/Defaults.hs +++ b/src/Hpack/Syntax/Defaults.hs @@ -1,8 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} module Hpack.Syntax.Defaults ( Defaults(..) , Github(..) diff --git a/src/Hpack/Syntax/Dependencies.hs b/src/Hpack/Syntax/Dependencies.hs index 8e9da611..f3c8b01b 100644 --- a/src/Hpack/Syntax/Dependencies.hs +++ b/src/Hpack/Syntax/Dependencies.hs @@ -1,6 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} module Hpack.Syntax.Dependencies ( Dependencies(..) @@ -34,7 +32,7 @@ import Hpack.Syntax.ParseDependencies newtype Dependencies = Dependencies { unDependencies :: Map String DependencyInfo -} deriving (Eq, Show, Semigroup, Monoid) +} deriving newtype (Eq, Show, Semigroup, Monoid) instance IsList Dependencies where type Item Dependencies = (String, DependencyInfo) diff --git a/src/Hpack/Syntax/DependencyVersion.hs b/src/Hpack/Syntax/DependencyVersion.hs index 69c6c64f..8ba9f9be 100644 --- a/src/Hpack/Syntax/DependencyVersion.hs +++ b/src/Hpack/Syntax/DependencyVersion.hs @@ -1,7 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE ViewPatterns #-} module Hpack.Syntax.DependencyVersion ( githubBaseUrl , GitRef diff --git a/src/Hpack/Syntax/Git.hs b/src/Hpack/Syntax/Git.hs index e9cec917..eed1ff9b 100644 --- a/src/Hpack/Syntax/Git.hs +++ b/src/Hpack/Syntax/Git.hs @@ -14,7 +14,7 @@ isValidRef ref = && not (any (isPrefixOf ".") components) && not (".." `isInfixOf` ref) && not (any isControl ref) - && all (`notElem` " ~^:?*[\\") ref + && all (`notElem` special) ref && not ("//" `isInfixOf` ref) && not ("/" `isPrefixOf` ref) && not ("/" `isSuffixOf` ref) @@ -22,6 +22,9 @@ isValidRef ref = && not ("@{" `isInfixOf` ref) && not (ref == "@") where + special :: String + special = " ~^:?*[\\" + components = splitDirectories ref isControl :: Char -> Bool diff --git a/src/Hpack/Syntax/ParseDependencies.hs b/src/Hpack/Syntax/ParseDependencies.hs index bcd90238..0d4e99b3 100644 --- a/src/Hpack/Syntax/ParseDependencies.hs +++ b/src/Hpack/Syntax/ParseDependencies.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} module Hpack.Syntax.ParseDependencies where import Data.Text (Text) diff --git a/src/Hpack/Util.hs b/src/Hpack/Util.hs index 18bc9267..ae1b0245 100644 --- a/src/Hpack/Util.hs +++ b/src/Hpack/Util.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE LambdaCase #-} module Hpack.Util ( GhcOption , GhcProfOption diff --git a/src/Hpack/Yaml.hs b/src/Hpack/Yaml.hs index c68c427c..09d4d71d 100644 --- a/src/Hpack/Yaml.hs +++ b/src/Hpack/Yaml.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE LambdaCase #-} module Hpack.Yaml ( -- | /__NOTE:__/ This module is exposed to allow integration of Hpack into -- other tools. It is not meant for general use by end users. The following diff --git a/test/Data/Aeson/Config/FromValueSpec.hs b/test/Data/Aeson/Config/FromValueSpec.hs index 06b3eb9f..ca768de6 100644 --- a/test/Data/Aeson/Config/FromValueSpec.hs +++ b/test/Data/Aeson/Config/FromValueSpec.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE ConstraintKinds #-} module Data.Aeson.Config.FromValueSpec where import Helper @@ -120,4 +115,4 @@ spec = do region: somewhere zip: '123456' foo: bar - |] `shouldDecodeTo` Right (Map.fromList [("Joe", Address "somewhere" "123456")], ["$.Joe.foo"]) + |] `shouldDecodeTo` Right (Map.fromList [("Joe" :: String, Address "somewhere" "123456")], ["$.Joe.foo"]) diff --git a/test/Data/Aeson/Config/TypesSpec.hs b/test/Data/Aeson/Config/TypesSpec.hs index 472aa427..bfa3a139 100644 --- a/test/Data/Aeson/Config/TypesSpec.hs +++ b/test/Data/Aeson/Config/TypesSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE QuasiQuotes #-} module Data.Aeson.Config.TypesSpec (spec) where import Helper diff --git a/test/EndToEndSpec.hs b/test/EndToEndSpec.hs index 6ebabd59..48edebfc 100644 --- a/test/EndToEndSpec.hs +++ b/test/EndToEndSpec.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE LambdaCase #-} -{-# LANGUAGE ConstraintKinds #-} module EndToEndSpec (spec) where import Prelude hiding (writeFile) diff --git a/test/Helper.hs b/test/Helper.hs index 8b40088c..bd11596f 100644 --- a/test/Helper.hs +++ b/test/Helper.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE ConstraintKinds #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Helper ( module Test.Hspec diff --git a/test/Hpack/CabalFileSpec.hs b/test/Hpack/CabalFileSpec.hs index ac37070b..9223f79d 100644 --- a/test/Hpack/CabalFileSpec.hs +++ b/test/Hpack/CabalFileSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE QuasiQuotes #-} module Hpack.CabalFileSpec (spec) where import Helper diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs index fe6d1f31..aa70252b 100644 --- a/test/Hpack/ConfigSpec.hs +++ b/test/Hpack/ConfigSpec.hs @@ -1,11 +1,5 @@ {-# LANGUAGE OverloadedLists #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE ConstraintKinds #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hpack.ConfigSpec ( spec diff --git a/test/Hpack/LicenseSpec.hs b/test/Hpack/LicenseSpec.hs index 6df0402b..1e1061e8 100644 --- a/test/Hpack/LicenseSpec.hs +++ b/test/Hpack/LicenseSpec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE QuasiQuotes #-} module Hpack.LicenseSpec (spec) where import Helper diff --git a/test/Hpack/ModuleSpec.hs b/test/Hpack/ModuleSpec.hs index b3cb8e87..1cf808e3 100644 --- a/test/Hpack/ModuleSpec.hs +++ b/test/Hpack/ModuleSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} module Hpack.ModuleSpec (spec) where import Helper diff --git a/test/Hpack/Render/DslSpec.hs b/test/Hpack/Render/DslSpec.hs index 227e9e2d..76e1144d 100644 --- a/test/Hpack/Render/DslSpec.hs +++ b/test/Hpack/Render/DslSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} module Hpack.Render.DslSpec where import Test.Hspec diff --git a/test/Hpack/RenderSpec.hs b/test/Hpack/RenderSpec.hs index d433ea49..070728d7 100644 --- a/test/Hpack/RenderSpec.hs +++ b/test/Hpack/RenderSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedLists #-} module Hpack.RenderSpec (spec) where diff --git a/test/Hpack/Syntax/BuildToolsSpec.hs b/test/Hpack/Syntax/BuildToolsSpec.hs index 198ff257..e1deb106 100644 --- a/test/Hpack/Syntax/BuildToolsSpec.hs +++ b/test/Hpack/Syntax/BuildToolsSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedLists #-} module Hpack.Syntax.BuildToolsSpec (spec) where diff --git a/test/Hpack/Syntax/DefaultsSpec.hs b/test/Hpack/Syntax/DefaultsSpec.hs index 5438b7ae..a066728e 100644 --- a/test/Hpack/Syntax/DefaultsSpec.hs +++ b/test/Hpack/Syntax/DefaultsSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE QuasiQuotes #-} module Hpack.Syntax.DefaultsSpec (spec) where import Helper diff --git a/test/Hpack/Syntax/DependenciesSpec.hs b/test/Hpack/Syntax/DependenciesSpec.hs index 3d7bfd30..05c449ef 100644 --- a/test/Hpack/Syntax/DependenciesSpec.hs +++ b/test/Hpack/Syntax/DependenciesSpec.hs @@ -1,6 +1,4 @@ -{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedLists #-} -{-# LANGUAGE OverloadedStrings #-} module Hpack.Syntax.DependenciesSpec (spec) where import Helper diff --git a/test/Hpack/Syntax/GitSpec.hs b/test/Hpack/Syntax/GitSpec.hs index f33f7137..8d3b46d2 100644 --- a/test/Hpack/Syntax/GitSpec.hs +++ b/test/Hpack/Syntax/GitSpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE QuasiQuotes #-} module Hpack.Syntax.GitSpec (spec) where import Helper @@ -33,7 +32,7 @@ spec = do it "rejects space" $ do isValidRef "foo bar" `shouldBe` False - forM_ ["~", "^", ":", "?", "*", "[", "\\"] $ \ xs -> do + forM_ ["~", "^", ":", "?", "*", "[", "\\" :: String] $ \ xs -> do it [i|rejects #{xs}|] $ do isValidRef [i|foo#{xs}bar|] `shouldBe` False diff --git a/test/Hpack/Utf8Spec.hs b/test/Hpack/Utf8Spec.hs index 187e8ab7..76c80ee6 100644 --- a/test/Hpack/Utf8Spec.hs +++ b/test/Hpack/Utf8Spec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} module Hpack.Utf8Spec (spec) where import Helper