aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2018-05-28 03:13:15 +0200
committerSimon Jakobi <simon.jakobi@gmail.com>2018-06-13 23:05:08 +0200
commit090813eaa7a7dbc5ba20a979150ca37521849994 (patch)
treefff9e458a132069a10f79538f965ad43450da75d /haddock-api/src/Haddock/Interface/Create.hs
parent9b9fb7ed2e7f30cca8693cdb186eaea8eeca0860 (diff)
Adjust to new HsDocString internals
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Create.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 8b929e15..b04a3777 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -58,7 +58,7 @@ import Packages ( lookupModuleInAllPackages, PackageName(..) )
import Bag
import RdrName
import TcRnTypes
-import FastString ( concatFS, unpackFS )
+import FastString ( concatFS, unpackFS, fastStringToByteString)
import BasicTypes ( StringLiteral(..), SourceText(..) )
import qualified Outputable as O
import HsDecls ( getConArgs )
@@ -304,11 +304,11 @@ 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: " (concatFS $ map (sl_fs . unLoc) msg)
- WarningTxt _ msg -> format "Warning: " (concatFS $ map (sl_fs . unLoc) msg)
+ DeprecatedTxt _ msg -> format "Deprecated: " (foldMap (fastStringToByteString . sl_fs . unLoc) msg)
+ WarningTxt _ msg -> format "Warning: " (foldMap (fastStringToByteString . sl_fs . unLoc) msg)
where
- format x xs = DocWarning . DocParagraph . DocAppend (DocString x)
- <$> processDocString dflags gre (HsDocString xs)
+ format x bs = DocWarning . DocParagraph . DocAppend (DocString x)
+ <$> processDocString dflags gre (mkHsDocStringUtf8ByteString bs)
-------------------------------------------------------------------------------