From adca17adc9f53bb8ab451d0a11911c04145c8fb3 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Mon, 8 Feb 2021 16:03:17 +0100 Subject: NameCache doesn't store a UniqSupply anymore --- hypsrc-test/ref/src/Classes.html | 14 +++++++------- hypsrc-test/ref/src/Records.html | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'hypsrc-test') diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html index 688b6db6..16d3b333 100644 --- a/hypsrc-test/ref/src/Classes.html +++ b/hypsrc-test/ref/src/Classes.html @@ -194,7 +194,7 @@ >bar :: Int -> Int barbaz :: Int -> (Int, Int) bazbar :: [a] -> Int barbaz :: Int -> ([a], [a]) baznorf :: [Int] -> Int norfquux :: ([a], [a]) -> [a] quuxplugh :: forall a b. Either a a -> Either b b -> Either (a -> b) (b -> a) plughInt -x :: Int x :: Point -> Int +x :: Int xInt -y :: Int y :: Point -> Int +y :: Int yInt -y :: Int -x :: Int -y :: Point -> Int x :: Point -> Int +y :: Point -> Int +x :: Int +y :: Int .. Date: Sat, 20 Mar 2021 03:48:13 +0200 Subject: Specialization of Data.List --- html-test/ref/BundledPatterns.html | 2 +- html-test/ref/BundledPatterns2.html | 2 +- html-test/ref/Identifiers.html | 18 +++++++++--------- hypsrc-test/Main.hs | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'hypsrc-test') diff --git a/html-test/ref/BundledPatterns.html b/html-test/ref/BundledPatterns.html index 82f58e49..8ac16a68 100644 --- a/html-test/ref/BundledPatterns.html +++ b/html-test/ref/BundledPatterns.html @@ -152,7 +152,7 @@ > subscript starting from 0 and ending at length - 1 subscript starting from 0 and ending at length - 1++, elemFoldable
  • , ++, elemFoldable, elem
  • Unqualified: 1 `elem``Foldable` [-3..3]
  • Qualified: 1 `elem` [-3..3]
  • Namespaced: `elem``Foldable`, `elem` Date: Wed, 2 Jun 2021 00:15:10 +0530 Subject: Update haddockHypSrc tests since we now compute slighly more type info (#1397) --- hypsrc-test/ref/src/UsingQuasiquotes.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'hypsrc-test') diff --git a/hypsrc-test/ref/src/UsingQuasiquotes.html b/hypsrc-test/ref/src/UsingQuasiquotes.html index 1e7aef2c..b3ce68ec 100644 --- a/hypsrc-test/ref/src/UsingQuasiquotes.html +++ b/hypsrc-test/ref/src/UsingQuasiquotes.html @@ -78,7 +78,10 @@ > [Char] +[string| foo bar |] [Char] +[string| some mulitline quasiquote -- cgit v1.2.3 From a0938c6c48ecf8d324b636d178b2139a2d3396f2 Mon Sep 17 00:00:00 2001 From: sheaf Date: Fri, 15 Oct 2021 22:19:42 +0200 Subject: update haddockHypsrcTest for GHC MR !6705 (#1430) --- hypsrc-test/ref/src/Classes.html | 3 +++ hypsrc-test/ref/src/Constructors.html | 1 + hypsrc-test/ref/src/Quasiquoter.html | 2 ++ 3 files changed, 6 insertions(+) (limited to 'hypsrc-test') diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html index 16d3b333..4b0343cf 100644 --- a/hypsrc-test/ref/src/Classes.html +++ b/hypsrc-test/ref/src/Classes.html @@ -342,6 +342,7 @@ forall a. a -> a >[a] -> Int +forall a. [a] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int [Int] -> Int +forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a [Int] -> Int +forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a [Int] -> Int +forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a Exp -> Q Exp +forall a. a -> Q a forall (f :: * -> *) a. Applicative f => a -> f a String -> Q a +forall a. String -> Q a forall (m :: * -> *) a. MonadFail m => String -> m a Date: Tue, 22 Mar 2022 21:17:50 +0000 Subject: Update test output --- hypsrc-test/ref/src/Quasiquoter.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hypsrc-test') diff --git a/hypsrc-test/ref/src/Quasiquoter.html b/hypsrc-test/ref/src/Quasiquoter.html index 53dc3474..76faac5a 100644 --- a/hypsrc-test/ref/src/Quasiquoter.html +++ b/hypsrc-test/ref/src/Quasiquoter.html @@ -80,8 +80,10 @@ -- | Quoter for constructing multiline string literals-- | Quoter for constructing multiline string literals Date: Sun, 24 Jul 2022 07:45:59 -0400 Subject: Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. --- .hlint.yaml | 1 - .../src/Haddock/Backends/Hyperlinker/Renderer.hs | 2 +- haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 2 +- haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | 2 +- haddock-api/src/Haddock/GhcUtils.hs | 2 +- haddock-api/src/Haddock/Interface/Create.hs | 2 +- haddock-api/src/Haddock/Utils/Json.hs | 2 +- haddock-test/src/Test/Haddock.hs | 8 ++-- hypsrc-test/ref/src/Operators.html | 56 +++++++--------------- hypsrc-test/src/Operators.hs | 4 +- 10 files changed, 29 insertions(+), 52 deletions(-) (limited to 'hypsrc-test') diff --git a/.hlint.yaml b/.hlint.yaml index 4a0c8ddc..b57c494f 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -10,7 +10,6 @@ - ignore: {name: "Move brackets to avoid $"} # 7 hints - ignore: {name: "Move guards forward"} # 1 hint - ignore: {name: "Move map inside list comprehension"} # 2 hints -- ignore: {name: "Redundant $"} # 11 hints - ignore: {name: "Redundant <$>"} # 3 hints - ignore: {name: "Redundant bracket"} # 44 hints - ignore: {name: "Redundant id"} # 1 hint 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 diff --git a/haddock-test/src/Test/Haddock.hs b/haddock-test/src/Test/Haddock.hs index 1019e815..fe547ad5 100644 --- a/haddock-test/src/Test/Haddock.hs +++ b/haddock-test/src/Test/Haddock.hs @@ -89,9 +89,9 @@ runHaddock cfg@(Config { .. }) = do , pure $ "--odir=" ++ outDir cfgDirConfig tpkg , tpkgFiles tpkg ] - , pcEnv = Just $ cfgEnv - , pcStdOut = Just $ haddockStdOut - , pcStdErr = Just $ haddockStdOut + , pcEnv = Just cfgEnv + , pcStdOut = Just haddockStdOut + , pcStdErr = Just haddockStdOut } let msg = "Failed to run Haddock on test package '" ++ tpkgName tpkg ++ "'" @@ -159,7 +159,7 @@ diffFile cfg diff file = do hFlush stdout handle <- runProcess' diff $ processConfig { pcArgs = [outFile', refFile'] - , pcStdOut = Just $ stdout + , pcStdOut = Just stdout } waitForProcess handle >> return () where diff --git a/hypsrc-test/ref/src/Operators.html b/hypsrc-test/ref/src/Operators.html index 04006a0d..8519d9de 100644 --- a/hypsrc-test/ref/src/Operators.html +++ b/hypsrc-test/ref/src/Operators.html @@ -33,11 +33,6 @@ - - ((a, b) -> c -> (a, b)) -> (a, b) -> c -> (a, b) -forall a b. (a -> b) -> a -> b -$ ( [a] -> [a] a +++ b = a ++ b ++ a @@ -18,6 +17,5 @@ a */\* b = concatMap (*** b) a (**/\**) :: [[a]] -> [[a]] -> [[a]] a **/\** b = zipWith (*/\*) [a +++ b] (a $$$ b) - (#.#) :: a -> b -> (c -> (a, b)) -a #.# b = const $ (a, b) +a #.# b = const (a, b) -- cgit v1.2.3