hlint 3.2.7 → 3.2.8
raw patch · 4 files changed
+13/−3 lines, 4 filesdep ~aesondep ~extraPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, extra
API changes (from Hackage documentation)
Files
- CHANGES.txt +3/−0
- hlint.cabal +1/−1
- src/Config/Yaml.hs +8/−1
- src/Hint/Fixities.hs +1/−1
CHANGES.txt view
@@ -1,5 +1,8 @@ Changelog for HLint (* = breaking change) +3.2.8, released 2021-12-27+ #1304, support aeson-2.0+ #1286, compatibility with extra-1.7.10 3.2.7, released 2021-01-16 #1202, add missing parentheses for Avoid Lambda #1201, allow matching through the & operator (similar to $)
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.18 build-type: Simple name: hlint-version: 3.2.7+version: 3.2.8 license: BSD3 license-file: LICENSE category: Development
src/Config/Yaml.hs view
@@ -40,6 +40,9 @@ import Language.Haskell.GhclibParserEx.GHC.Hs.ExtendInstances import Language.Haskell.GhclibParserEx.GHC.Types.Name.Reader import Data.Char+#if MIN_VERSION_aeson(2,0,0)+import Data.Aeson.KeyMap (toHashMapText)+#endif #ifdef HS_YAML @@ -68,6 +71,10 @@ #endif +#if !MIN_VERSION_aeson(2,0,0)+toHashMapText :: a -> a+toHashMapText = id+#endif -- | Read a config file in YAML format. Takes a filename, and optionally the contents. -- Fails if the YAML doesn't parse or isn't valid HLint YAML@@ -138,7 +145,7 @@ parseArray v = pure [v] parseObject :: Val -> Parser (Map.HashMap T.Text Value)-parseObject (getVal -> Object x) = pure x+parseObject (getVal -> Object x) = pure (toHashMapText x) parseObject v = parseFail v "Expected an Object" parseObject1 :: Val -> Parser (String, Val)
src/Hint/Fixities.hs view
@@ -62,7 +62,7 @@ | i == 0 = (c, p) | otherwise = (p, c) in- case compareFixity <$> (fixities !? occNameString lop) <*> (fixities !? occNameString rop) of+ case compareFixity <$> (fixities Data.Map.!? occNameString lop) <*> (fixities Data.Map.!? occNameString rop) of Just (False, r) | i == 0 -> not (needParenAsChild cr || r) | otherwise -> r