You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-haskell/feed/files/feed-0.3.9.2-utf8-string.patch

26 lines
728 B

diff --git a/Text/Feed/Import.hs b/Text/Feed/Import.hs
index 8fde5f9..c001cee 100644
--- a/Text/Feed/Import.hs
+++ b/Text/Feed/Import.hs
@@ -12,6 +12,7 @@
--
--------------------------------------------------------------------
+{-# LANGUAGE CPP #-}
module Text.Feed.Import
( parseFeedFromFile -- :: FilePath -> IO Feed
, parseFeedString -- :: String -> IO Feed
@@ -32,7 +33,12 @@ import Text.XML.Light.Lexer ( XmlSource )
import Control.Monad
+#if MIN_VERSION_utf8_string(1,0,0)
+import Prelude as UTF8 (readFile)
+import Prelude
+#else
import System.IO.UTF8 as UTF8 ( readFile )
+#endif
-- | 'parseFeedFromFile fp' reads in the contents of the file at @fp@;
-- the assumed encoding is UTF-8.