diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2019-02-16 10:41:22 -0500 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2019-02-16 10:41:22 -0500 |
commit | 33cdd810e4222b92bc22f7f5b7196fc97fd3cea6 (patch) | |
tree | 3273fe1e7321663b15249f7a639f56b74b1742fe | |
parent | 0438f0ac7605fb6b9850acd34cc169f84a3f6088 (diff) |
Fix tests broken by GHC
Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some
of the hyperlinker output. Accepted the new output (hovering over a
`..` now shows you what that wildcard binds).
Also fixed some stray deprecation warnings.
-rw-r--r-- | haddock-api/src/Haddock/Convert.hs | 2 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Interface/Create.hs | 6 | ||||
-rw-r--r-- | hypsrc-test/ref/src/Records.html | 29 |
3 files changed, 24 insertions, 13 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs index 9c876b14..37bad0d8 100644 --- a/haddock-api/src/Haddock/Convert.hs +++ b/haddock-api/src/Haddock/Convert.hs @@ -44,7 +44,7 @@ import TysWiredIn ( eqTyConName, listTyConName, liftedTypeKindTyConName import PrelNames ( hasKey, eqTyConKey, ipClassKey, tYPETyConKey , liftedRepDataConKey ) import Unique ( getUnique ) -import Util ( chkAppend,dropList, filterByList, filterOut, splitAtList ) +import Util ( chkAppend,dropList, filterByList, filterOut ) import Var import VarSet diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 8d7b1338..a63f44ce 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -52,7 +52,7 @@ import Packages ( lookupModuleInAllPackages, PackageName(..) ) import Bag import RdrName import TcRnTypes -import FastString ( unpackFS, fastStringToByteString) +import FastString ( unpackFS, bytesFS ) import BasicTypes ( StringLiteral(..), SourceText(..), PromotionFlag(..) ) import qualified Outputable as O @@ -296,8 +296,8 @@ moduleWarning dflags gre (WarnAll w) = Just <$> parseWarning dflags gre w parseWarning :: DynFlags -> GlobalRdrEnv -> WarningTxt -> ErrMsgM (Doc Name) parseWarning dflags gre w = case w of - DeprecatedTxt _ msg -> format "Deprecated: " (foldMap (fastStringToByteString . sl_fs . unLoc) msg) - WarningTxt _ msg -> format "Warning: " (foldMap (fastStringToByteString . sl_fs . unLoc) msg) + DeprecatedTxt _ msg -> format "Deprecated: " (foldMap (bytesFS . sl_fs . unLoc) msg) + WarningTxt _ msg -> format "Warning: " (foldMap (bytesFS . sl_fs . unLoc) msg) where format x bs = DocWarning . DocParagraph . DocAppend (DocString x) <$> processDocString dflags gre (mkHsDocStringUtf8ByteString bs) diff --git a/hypsrc-test/ref/src/Records.html b/hypsrc-test/ref/src/Records.html index dc09ff82..abe06202 100644 --- a/hypsrc-test/ref/src/Records.html +++ b/hypsrc-test/ref/src/Records.html @@ -1284,22 +1284,33 @@ forall a. Num a => a -> a -> a ></span ><span > </span + ><span class="annot" + ><a href="Records.html#Point" + ><span class="hs-identifier hs-type" + >Point</span + ></a + ></span + ><span class="hs-special" + >{</span ><span id="" ><span id="" ><span class="annot" - ><a href="Records.html#Point" - ><span class="hs-identifier hs-type" - >Point</span + ><span class="annottext" + >Int +y :: Int +x :: Int +y :: Point -> Int +x :: Point -> Int +</span + ><a href="#" + ><span class="hs-glyph hs-var hs-var hs-var hs-var" + >..</span ></a ></span - ><span class="hs-special" - >{</span - ><span class="hs-glyph" - >..</span - ><span class="hs-special" - >}</span ></span ></span + ><span class="hs-special" + >}</span ><span > </span ><span class="hs-glyph" |