From b973784c65c4d20c893b5377a7ced557d0a420cf Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 18 Jun 2014 11:01:18 +0800 Subject: Compatibility with older versions of base and bytestring --- haddock-library/src/Documentation/Haddock/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-library/src/Documentation/Haddock/Parser.hs') diff --git a/haddock-library/src/Documentation/Haddock/Parser.hs b/haddock-library/src/Documentation/Haddock/Parser.hs index 3d146d33..f0597462 100644 --- a/haddock-library/src/Documentation/Haddock/Parser.hs +++ b/haddock-library/src/Documentation/Haddock/Parser.hs @@ -437,7 +437,7 @@ autoUrl = mkLink <$> url where url = mappend <$> ("http://" <|> "https://" <|> "ftp://") <*> takeWhile1 (not . isSpace) mkLink :: BS.ByteString -> DocH mod a - mkLink s = case BS.unsnoc s of + mkLink s = case unsnoc s of Just (xs, x) | x `elem` ",.!?" -> DocHyperlink (Hyperlink (decodeUtf8 xs) Nothing) <> DocString [x] _ -> DocHyperlink (Hyperlink (decodeUtf8 s) Nothing) -- cgit v1.2.3