hoogle 5.0.18.2 → 5.0.18.3
raw patch · 4 files changed
+20/−19 lines, 4 filesdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson
API changes (from Hackage documentation)
Files
- CHANGES.txt +2/−0
- hoogle.cabal +1/−1
- src/Action/Search.hs +2/−2
- src/Input/Item.hs +15/−16
CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Hoogle (* = API change, @ = database format change) +5.0.18.3, released 2021-12-24+ Compatibility with aeson-2.0 5.0.18.2, released 2021-09-01 Compatibility with extra-1.7.10 #370, add --jsonl to produce JSON on separate lines
hoogle.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.18 build-type: Simple name: hoogle-version: 5.0.18.2+version: 5.0.18.3 license: BSD3 license-file: LICENSE category: Development
src/Action/Search.hs view
@@ -173,7 +173,7 @@ "Ord a => [a] -> [a]" === hackage "base/docs/Data-List.html#v:sort" "ShakeOptions -> Int" === hackage "shake/docs/Development-Shake.html#v:shakeThreads" "is:module" === hackage "base/docs/Prelude.html"- "visibleDataCons" === hackage "ghc/docs/TyCon.html#v:visibleDataCons"+ "visibleDataCons" === hackage "ghc/docs/GHC-Core-TyCon.html#v:visibleDataCons" "sparkle" === hackage "sparkle" -- library without Hoogle docs "weeder" === hackage "weeder" -- executable in Stackage "supero" === hackage "supero"@@ -189,7 +189,7 @@ ] query "a -> [a]" [ InTop 10 ("repeat" `inPackage` "base")- , InTop 50 ("singleton" `inModule` "Util")+ , KnownFailure "" $ InTop 50 ("singleton" `inModule` "Util") , DoesNotFind ("head" `inPackage` "base") , DoesNotFind ("last" `inPackage` "base") , InTop 50 ("pure" `inPackage` "base")
src/Input/Item.hs view
@@ -29,7 +29,6 @@ import Prelude import qualified Data.Aeson as J import Data.Aeson.Types-import qualified Data.Text as T import Test.QuickCheck --------------------------------------------------------------------- -- TYPES@@ -122,31 +121,31 @@ instance ToJSON Target where toJSON (Target a b c d e f) = object [- ("url" :: T.Text, toJSON a),- ("package" :: T.Text, maybeNamedURL b),- ("module" :: T.Text, maybeNamedURL c),- ("type" :: T.Text, toJSON d),- ("item" :: T.Text, toJSON e),- ("docs" :: T.Text, toJSON f)+ ("url", toJSON a),+ ("package", maybeNamedURL b),+ ("module", maybeNamedURL c),+ ("type", toJSON d),+ ("item", toJSON e),+ ("docs", toJSON f) ] where maybeNamedURL m = maybe emptyObject namedURL m- namedURL (name, url) = object [("name" :: T.Text, toJSON name), ("url" :: T.Text, toJSON url)]+ namedURL (name, url) = object [("name", toJSON name), ("url", toJSON url)] instance FromJSON Target where parseJSON = withObject "Target" $ \o ->- Target <$> o .: ("url" :: T.Text)- <*> o `namedUrl` ("package" :: T.Text)- <*> o `namedUrl` ("module" :: T.Text)- <*> o .: ("type" :: T.Text)- <*> o .: ("item" :: T.Text)- <*> o .: ("docs" :: T.Text)+ Target <$> o .: "url"+ <*> o `namedUrl` "package"+ <*> o `namedUrl` "module"+ <*> o .: "type"+ <*> o .: "item"+ <*> o .: "docs" where namedUrl o' n = do mObj <- o' .: n if null mObj then pure Nothing else do- pkName <- mObj .: ("name" :: T.Text)- pkUrl <- mObj .: ("url" :: T.Text)+ pkName <- mObj .: "name"+ pkUrl <- mObj .: "url" pure $ Just (pkName, pkUrl) instance Arbitrary Target where