packages feed

basic-prelude 0.3.13 → 0.4.0

raw patch · 4 files changed

+17/−16 lines, 4 filesdep +filepathdep −system-filepathPVP ok

version bump matches the API change (PVP)

Dependencies added: filepath

Dependencies removed: system-filepath

API changes (from Hackage documentation)

- CorePrelude: basename :: FilePath -> FilePath
- CorePrelude: data FilePath :: *
- CorePrelude: directory :: FilePath -> FilePath
- CorePrelude: displayException :: Exception e => e -> String
- CorePrelude: filename :: FilePath -> FilePath
- CorePrelude: hasExtension :: FilePath -> Text -> Bool
+ CorePrelude: type FilePath = String
- BasicPrelude: map :: (Functor f) => (a -> b) -> f a -> f b
+ BasicPrelude: map :: Functor f => (a -> b) -> f a -> f b
- CorePrelude: (<.>) :: FilePath -> Text -> FilePath
+ CorePrelude: (<.>) :: FilePath -> String -> FilePath
- CorePrelude: class Applicative m => Monad (m :: * -> *)
+ CorePrelude: class Monad (m :: * -> *)

Files

BasicPrelude.hs view
@@ -105,7 +105,6 @@ import qualified Data.Text.IO as Text import qualified Data.Text.Lazy as LText import qualified Data.Text.Lazy.IO as LText-import qualified Filesystem.Path.CurrentOS as FilePath import qualified Prelude import Data.Text.Encoding (encodeUtf8, decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode)@@ -167,16 +166,16 @@ -- | Read a file and return the contents of the file as Text. -- The entire file is read strictly. readFile :: FilePath -> IO Text-readFile = Text.readFile . FilePath.encodeString+readFile = Text.readFile  -- | Write Text to a file. -- The file is truncated to zero length before writing begins. writeFile :: FilePath -> Text -> IO ()-writeFile = Text.writeFile . FilePath.encodeString+writeFile = Text.writeFile  -- | Write Text to the end of a file. appendFile :: FilePath -> Text -> IO ()-appendFile = Text.appendFile . FilePath.encodeString+appendFile = Text.appendFile  textToString :: Text -> Prelude.String textToString = Text.unpack@@ -189,17 +188,20 @@ -- -- Since 0.3.13 fpToText :: FilePath -> Text-fpToText = either id id . FilePath.toText+fpToText = Text.pack+{-# DEPRECATED fpToText "Use Data.Text.pack" #-}  -- | -- Since 0.3.13 fpFromText :: Text -> FilePath-fpFromText = FilePath.fromText+fpFromText = Text.unpack+{-# DEPRECATED fpFromText "Use Data.Text.unpack" #-}  -- | -- Since 0.3.13 fpToString :: FilePath -> Prelude.String-fpToString = FilePath.encodeString+fpToString = id+{-# DEPRECATED fpToString "Use id" #-}  -- | Note that this is /not/ the standard @Data.Text.Encoding.decodeUtf8@. That -- function will throw impure exceptions on any decoding errors. This function
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.4.0++* Drop system-filepath+ ## 0.3.13  * Export converters between FilePath <-> Text, String. [#56](https://github.com/snoyberg/basic-prelude/pull/56)
CorePrelude.hs view
@@ -155,13 +155,9 @@     , Control.Exception.Lifted.uninterruptibleMask_     , module System.IO.Error       -- ** Files-    , F.FilePath+    , Prelude.FilePath     , (F.</>)     , (F.<.>)-    , F.hasExtension-    , F.basename-    , F.filename-    , F.directory       -- ** Strings     , Prelude.String       -- ** Hashing@@ -186,8 +182,6 @@ import qualified Control.Exception.Lifted import qualified Data.Typeable -import qualified Filesystem.Path.CurrentOS as F- import Data.Word (Word8, Word32, Word64, Word) import Data.Int (Int32, Int64) @@ -219,6 +213,7 @@ import Data.HashMap.Strict (HashMap) import Data.HashSet (HashSet) import qualified ReadArgs+import qualified System.FilePath as F  import qualified System.Environment import qualified Data.Text
basic-prelude.cabal view
@@ -1,5 +1,5 @@ name:                basic-prelude-version:             0.3.13+version:             0.4.0 synopsis:            An enhanced core prelude; a common foundation for alternate preludes. description:     The premise of @basic-prelude@ is that there are a lot of very commonly desired features missing from the standard @Prelude@, such as commonly used operators (@\<$\>@ and @>=>@, for instance) and imports for common datatypes (e.g., @ByteString@ and @Vector@). At the same time, there are lots of other components which are more debatable, such as providing polymorphic versions of common functions.@@ -29,10 +29,10 @@                      , containers                      , unordered-containers                      , vector-                     , system-filepath          >= 0.4     && < 0.5                      , ReadArgs                 >= 1.2     && < 1.3                      , lifted-base                      , safe+                     , filepath  source-repository head   type:     git