Encoding functions in scope by default.
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
* Removes ``throw`` and ``assert`` from ``Control.Exception`` exports.
|
* Removes ``throw`` and ``assert`` from ``Control.Exception`` exports.
|
||||||
* Removes ``unsafeShiftL`` and ``unsafeShiftR`` from ``Data.Bits`` exports.
|
* Removes ``unsafeShiftL`` and ``unsafeShiftR`` from ``Data.Bits`` exports.
|
||||||
* Reexport ``throw`` as ``unsafeThrow`` via Unsafe module.
|
* Reexport ``throw`` as ``unsafeThrow`` via Unsafe module.
|
||||||
|
* Hides all Show class functions. Only the Class itself is exported. Forbids
|
||||||
|
* custom instances that are not GHC derived.
|
||||||
|
* Export`` encodeUtf8`` and ``decodeUtf8`` functions by default.
|
||||||
|
|
||||||
0.1.5
|
0.1.5
|
||||||
=====
|
=====
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Design points:
|
|||||||
* Automatic string conversions.
|
* Automatic string conversions.
|
||||||
* Types for common data structures in scope.
|
* Types for common data structures in scope.
|
||||||
* Types for all common string types in scope.
|
* Types for all common string types in scope.
|
||||||
|
* Banishes impure exception throwing outside of IO.
|
||||||
* StateT/ReaderT/ExceptT transformers in scope by default.
|
* StateT/ReaderT/ExceptT transformers in scope by default.
|
||||||
* Foldable / Traversable functions in scope by default.
|
* Foldable / Traversable functions in scope by default.
|
||||||
* Unsafe functions are prefixed with "unsafe" in separate module.
|
* Unsafe functions are prefixed with "unsafe" in separate module.
|
||||||
|
|||||||
+21
-10
@@ -32,12 +32,17 @@ import Conv as X
|
|||||||
import Panic as X
|
import Panic as X
|
||||||
|
|
||||||
import Base as Base hiding (
|
import Base as Base hiding (
|
||||||
putStr -- Overriden by Show.putStr
|
putStr -- Overriden by Show.putStr
|
||||||
, putStrLn -- Overriden by Show.putStrLn
|
, putStrLn -- Overriden by Show.putStrLn
|
||||||
, print -- Overriden by Protolude.print
|
, print -- Overriden by Protolude.print
|
||||||
, show -- Overriden by Protolude.show
|
, error -- Overriden by Debug.error
|
||||||
, error -- Overriden by Debug.error
|
, undefined -- Overriden by Debug.undefined
|
||||||
, undefined -- Overriden by Debug.undefined
|
, show -- Overriden by Protolude.show
|
||||||
|
, showFloat -- Custom Show instances deprecated.
|
||||||
|
, showList -- Custom Show instances deprecated.
|
||||||
|
, showSigned -- Custom Show instances deprecated.
|
||||||
|
, showSignedFloat -- Custom Show instances deprecated.
|
||||||
|
, showsPrec -- Custom Show instances deprecated.
|
||||||
)
|
)
|
||||||
import qualified Base as PBase
|
import qualified Base as PBase
|
||||||
|
|
||||||
@@ -279,7 +284,6 @@ import Data.ByteString as X (ByteString)
|
|||||||
-- Text
|
-- Text
|
||||||
import Data.Text as X (Text)
|
import Data.Text as X (Text)
|
||||||
import qualified Data.Text.Lazy
|
import qualified Data.Text.Lazy
|
||||||
import qualified Data.Text.IO
|
|
||||||
|
|
||||||
import Data.Text.IO as X (
|
import Data.Text.IO as X (
|
||||||
getLine
|
getLine
|
||||||
@@ -290,14 +294,20 @@ import Data.Text.IO as X (
|
|||||||
, appendFile
|
, appendFile
|
||||||
)
|
)
|
||||||
|
|
||||||
import Data.Text.Lazy (
|
import Data.Text.Lazy as X (
|
||||||
toStrict
|
toStrict
|
||||||
, fromStrict
|
, fromStrict
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import Data.Text.Encoding as X (
|
||||||
|
encodeUtf8
|
||||||
|
, decodeUtf8
|
||||||
|
, decodeUtf8'
|
||||||
|
, decodeUtf8With
|
||||||
|
)
|
||||||
|
|
||||||
-- IO
|
-- IO
|
||||||
import System.Exit as X
|
import System.Exit as X
|
||||||
--import System.Info as X
|
|
||||||
import System.Environment as X (getArgs)
|
import System.Environment as X (getArgs)
|
||||||
import System.IO as X (
|
import System.IO as X (
|
||||||
Handle
|
Handle
|
||||||
@@ -317,6 +327,7 @@ import Control.Monad.ST as X
|
|||||||
import Control.Exception as X hiding (
|
import Control.Exception as X hiding (
|
||||||
throw
|
throw
|
||||||
, assert
|
, assert
|
||||||
|
, displayException
|
||||||
)
|
)
|
||||||
import Control.Monad.STM as X
|
import Control.Monad.STM as X
|
||||||
import Control.Concurrent as X
|
import Control.Concurrent as X
|
||||||
@@ -359,8 +370,8 @@ print = liftIO . PBase.print
|
|||||||
|
|
||||||
show :: (Show a, StringConv String b) => a -> b
|
show :: (Show a, StringConv String b) => a -> b
|
||||||
show x = toS (PBase.show x)
|
show x = toS (PBase.show x)
|
||||||
{-# SPECIALIZE show :: Show a => a -> String #-}
|
|
||||||
{-# SPECIALIZE show :: Show a => a -> Text #-}
|
{-# SPECIALIZE show :: Show a => a -> Text #-}
|
||||||
{-# SPECIALIZE show :: Show a => a -> LText #-}
|
{-# SPECIALIZE show :: Show a => a -> LText #-}
|
||||||
{-# SPECIALIZE show :: Show a => a -> ByteString #-}
|
{-# SPECIALIZE show :: Show a => a -> ByteString #-}
|
||||||
{-# SPECIALIZE show :: Show a => a -> LByteString #-}
|
{-# SPECIALIZE show :: Show a => a -> LByteString #-}
|
||||||
|
{-# SPECIALIZE show :: Show a => a -> String #-}
|
||||||
|
|||||||
Reference in New Issue
Block a user