diff options
author | Phil de Joux <philderbeast@gmail.com> | 2022-07-24 07:45:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 13:45:59 +0200 |
commit | 2f1711b301fea88eb1d0b40d1c04b2f0539fd882 (patch) | |
tree | 4523ca2ffd88b1002036879ab593d4abaff8d417 /haddock-api/src | |
parent | 90c38242e54d1a742426e2b1b3c7d71e226811bd (diff) |
Follow hlint suggestion: redundant $. (#1505)
* Follow hlint suggestion: redundant $.
* Remove $ and surplus blank lines in Operators.
Diffstat (limited to 'haddock-api/src')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/GhcUtils.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Utils/Json.hs | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs index a8a51e5d..7fa5a443 100644 --- a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs +++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs @@ -142,7 +142,7 @@ richToken srcs details Token{..} contexts = concatMap (Set.elems . identInfo) . Map.elems . nodeIdentifiers $ details -- pick an arbitrary non-evidence identifier to hyperlink with - identDet = Map.lookupMin $ Map.filter notEvidence $ nodeIdentifiers $ details + identDet = Map.lookupMin $ Map.filter notEvidence $ nodeIdentifiers details notEvidence = not . any isEvidenceContext . identInfo -- If we have name information, we can make links diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 8de1b1b8..2c3da7a9 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -725,7 +725,7 @@ ppInstanceSigs links splice unicode qual sigs = do L _ rtyp = dropWildCards typ -- Instance methods signatures are synified and thus don't have a useful -- SrcSpan value. Use the methods name location instead. - return $ ppSimpleSig links splice unicode qual HideEmptyContexts (getLocA $ head $ lnames) names rtyp + return $ ppSimpleSig links splice unicode qual HideEmptyContexts (getLocA $ head lnames) names rtyp lookupAnySubdoc :: Eq id1 => id1 -> [(id1, DocForDecl id2)] -> DocForDecl id2 diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs index 18405db8..575249ad 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs @@ -220,7 +220,7 @@ subOrphanInstances pkg qual lnks splice = maybe noHtml wrap . instTable where wrap = ((h1 << "Orphan instances") +++) instTable = fmap (thediv ! [ identifier ("section." ++ id_) ] <<) . subTableSrc pkg qual lnks splice - id_ = makeAnchorId $ "orphans" + id_ = makeAnchorId "orphans" subInstHead :: String -- ^ Instance unique id (for anchor generation) diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs index ebddb397..19494c8e 100644 --- a/haddock-api/src/Haddock/GhcUtils.hs +++ b/haddock-api/src/Haddock/GhcUtils.hs @@ -474,7 +474,7 @@ instance Parent (ConDecl GhcRn) where instance Parent (TyClDecl GhcRn) where children d | isDataDecl d = map unLoc $ concatMap (getConNames . unLoc) - $ (dd_cons . tcdDataDefn) $ d + $ (dd_cons . tcdDataDefn) d | isClassDecl d = map (unLoc . fdLName . unLoc) (tcdATs d) ++ [ unLoc n | L _ (TypeSig _ ns _) <- tcdSigs d, n <- ns ] diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index b3796906..17b9f367 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -331,7 +331,7 @@ mkAliasMap state impDecls = M.fromList $ mapMaybe (\(SrcLoc.L _ impDecl) -> do SrcLoc.L _ alias <- ideclAs impDecl - return $ + return (lookupModuleDyn state -- TODO: This is supremely dodgy, because in general the -- UnitId isn't going to look anything like the package diff --git a/haddock-api/src/Haddock/Utils/Json.hs b/haddock-api/src/Haddock/Utils/Json.hs index 6bcd38fa..0a796b4a 100644 --- a/haddock-api/src/Haddock/Utils/Json.hs +++ b/haddock-api/src/Haddock/Utils/Json.hs @@ -400,7 +400,7 @@ parseIntegralFromDouble d = let r = toRational d x = truncate r in if toRational x == r - then pure $ x + then pure x else fail $ "unexpected floating number " <> show d parseIntegral :: Integral a => String -> Value -> Parser a |