From 91429ccacc8cc60f91ca808232a2e01bcde92153 Mon Sep 17 00:00:00 2001 From: Lennart Spitzner Date: Thu, 25 May 2017 13:12:11 +0200 Subject: [PATCH] Remove unordered-containers direct dependency --- brittany.cabal | 4 ---- src/Language/Haskell/Brittany/Internal/Config/Types.hs | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/brittany.cabal b/brittany.cabal index ce1f632..25b248f 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -108,7 +108,6 @@ library { , semigroups >=0.18.2 && <0.19 , cmdargs >=0.10.14 && <0.11 , czipwith >=1.0.0.0 && <1.1 - , unordered-containers >=0.2.7 && <0.3 , ghc-boot-th >=8.0.1 && <8.1 } default-extensions: { @@ -170,7 +169,6 @@ executable brittany , semigroups , cmdargs , czipwith - , unordered-containers , ghc-boot-th , hspec >=2.4.1 && <2.5 , filepath >=1.4.1.0 && <1.5 @@ -249,7 +247,6 @@ test-suite unittests , semigroups , cmdargs , czipwith - , unordered-containers , ghc-boot-th , hspec >=2.4.1 && <2.5 } @@ -324,7 +321,6 @@ test-suite littests , semigroups , cmdargs , czipwith - , unordered-containers , ghc-boot-th , hspec >=2.4.1 && <2.5 , parsec >=3.1.11 && <3.2 diff --git a/src/Language/Haskell/Brittany/Internal/Config/Types.hs b/src/Language/Haskell/Brittany/Internal/Config/Types.hs index 96b4863..806e085 100644 --- a/src/Language/Haskell/Brittany/Internal/Config/Types.hs +++ b/src/Language/Haskell/Brittany/Internal/Config/Types.hs @@ -13,7 +13,6 @@ where import Data.Yaml import qualified Data.Aeson.Types as Aeson -import qualified Data.HashMap.Lazy as HML import GHC.Generics import Data.Data ( Data ) @@ -257,7 +256,7 @@ instance FromJSON (CConfig Maybe) where -- Pretends that the value is {} when the key is not present. (.:?=) :: FromJSON a => Object -> Text -> Parser a -o .:?= k = o .:? k >>= maybe (parseJSON (Object HML.empty)) pure +o .:?= k = o .:? k >>= maybe (parseJSON (Aeson.object [])) pure data IndentPolicy = IndentPolicyLeft -- never create a new indentation at more -- than old indentation + amount