packages feed

utf8-prelude 0.1.1 → 0.1.2

raw patch · 4 files changed

+41/−47 lines, 4 files

Files

System/UTF8IO.hs view
@@ -8,35 +8,16 @@ -- Stability   :  alpha -- Portability :  portable ----- This module defines the same entities as "System.IO" but uses UTF8 encoding.------ Usage:------ > import System.UTF8IO------ And you probably want to declare:------ > import qualified Prelude--- > import UTF8Prelude+-- "System.UTF8IO" defines the same entities as "System.IO" but with UTF8 text I/O operations. ----- This module is based on "System.IO.UTF8".+-- "System.UTF8IO" re-exports "System.IO.UTF8" and "System.IO" but hides the duplicate definitions (in favor of "System.IO.UTF8").  module System.UTF8IO     ( module System.IO     , module System.IO.UTF8     ) where -import System.IO.UTF8 hiding-    ( print-    , putStr-    , putStrLn-    , getLine-    , readLn-    , readFile-    , writeFile-    , appendFile-    , getContents-    )+import System.IO.UTF8  import System.IO hiding      ( print
Test.hs view
@@ -3,7 +3,7 @@  import Data.Maybe -import qualified Prelude+import Prelude() import UTF8Prelude  ----------------------
UTF8Prelude.hs view
@@ -8,28 +8,30 @@ -- Stability   :  alpha -- Portability :  portable ----- This module defines the same entities as "Prelude" but uses UTF8 encoding.+-- "UTF8Prelude" defines the same entities as "Prelude" but with UTF8 text I/O operations. -- -- Usage: --+-- > {-# LANGUAGE NoImplicitPrelude #-}+-- >+-- > import UTF8Prelude+--+-- or+--+-- > import Prelude()+-- > import UTF8Prelude+--+-- or+-- -- > import qualified Prelude -- > import UTF8Prelude ----- This module is based on "System.IO.UTF8".+-- "UTF8Prelude" re-exports "System.IO.UTF8" but hides the definitions not defined in "Prelude".  module UTF8Prelude      ( module Prelude---    , module System.IO.UTF8+    , module System.IO.UTF8     , error-    , print-    , putStr-    , putStrLn-    , getLine-    , readLn-    , readFile-    , writeFile-    , appendFile-    , getContents     ) where  import Codec.Binary.UTF8.String (encodeString)@@ -56,7 +58,7 @@  import qualified Prelude --- | UTF8 encoded error messages+-- | UTF8 encoded error messages. error :: String -> a error = Prelude.error . encodeString 
utf8-prelude.cabal view
@@ -1,21 +1,32 @@ name:           utf8-prelude-version:        0.1.1-synopsis:       Prelude and System.IO using UTF8 encoding+version:        0.1.2+synopsis:       Prelude and System.IO with UTF8 text I/O description:    -    This package contains the "UTF8Prelude" and "System.UTF8IO" library modules and the 'utf8-test' executable.+    utf8-prelude provides variants of "Prelude" and "System.IO" using UTF8 text I/O operations, making +    UTF8 text I/O even simpler.     .-    The 'utf8-test' executable tests some functions (@readFile@, @writeFile@, @putStrLn@).+    Three simple steps to switch to UTF8 with your Haskell code:     .-    Note: 'utf8-test' creates a file named 'writeFile_test.txt' in the current working directory.+    * In all modules import Prelude explicitly and replace every occurrence of "Prelude" with "UTF8Prelude".     .-    This package is based on the 'utf8-string' package: <http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string>. +    * Use the NoImplicitPrelude language extension.     .-    This package will be obsolate with GHC if GHC will have porper unicode support for text I/O -    (planned beyond GHC 6.10, see <http://hackage.haskell.org/trac/ghc/wiki/Status/Releases>).+    * In all modules replace every occurrence of "System.IO" with "System.UTF8IO".+    .+    utf8-prelude also provides a basic testing tool:+    utf8-test tests the functions readFile, writeFile and putStrLn.+    Note: utf8-test creates a file named writeFile_test.txt in the current working directory.+    .+    utf8-prelude is based on utf8-string:+    <http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string/index.html>+    .+    This package will be obsolate with GHC if GHC will have porper unicode support for text I/O.+    It is planned beyond GHC 6.10: +    <http://hackage.haskell.org/trac/ghc/wiki/Status/Releases> category:       System-author:         Peter Divianszky <divip@aszt.inf.elte.hu>-maintainer:     Peter Divianszky <divip@aszt.inf.elte.hu>-copyright:      (c) 2008 by Peter Divianszky+author:         Péter Diviánszky <divip@aszt.inf.elte.hu>+maintainer:     Péter Diviánszky <divip@aszt.inf.elte.hu>+copyright:      (c) 2008 by Péter Diviánszky license:        BSD3 license-file:   LICENSE stability:      alpha