packages feed

classy-prelude 0.11.1.1 → 0.12.0

raw patch · 3 files changed

+19/−17 lines, 3 filesdep −system-filepathdep ~basic-preludedep ~chunked-datadep ~mono-traversablePVP ok

version bump matches the API change (PVP)

Dependencies removed: system-filepath

Dependency ranges changed: basic-prelude, chunked-data, mono-traversable

API changes (from Hackage documentation)

- ClassyPrelude: fpToTextWarn :: MonadIO m => FilePath -> m Text
+ ClassyPrelude: fpToTextWarn :: Monad m => FilePath -> m Text

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.12.0++* Drop system-filepath+ ## 0.11.1.1  * Compatibility with time >= 1.5 [#100](https://github.com/snoyberg/classy-prelude/pull/100)
ClassyPrelude.hs view
@@ -197,7 +197,6 @@ import Data.Builder import Data.MinLen import Data.ByteVector-import qualified Filesystem.Path.CurrentOS as F import System.IO (Handle, stdin, stdout, stderr, hClose)  import Debug.Trace (trace, traceShow)@@ -465,20 +464,19 @@ traceShowM = traceM . show  fpToString :: FilePath -> String-fpToString = F.encodeString+fpToString = id+{-# DEPRECATED fpToString "Now same as id" #-}  fpFromString :: String -> FilePath-fpFromString = F.decodeString+fpFromString = id+{-# DEPRECATED fpFromString "Now same as id" #-}  -- | Translates a 'FilePath' to a 'Text' -- -- Warns if there are non-unicode sequences in the file name-fpToTextWarn :: MonadIO m => FilePath -> m Text-fpToTextWarn fp = case F.toText fp of-    Right ok -> return ok-    Left bad -> do-        putStrLn $ pack $ "non-unicode filepath: " ++ F.encodeString fp-        return bad+fpToTextWarn :: Monad m => FilePath -> m Text+fpToTextWarn = return . pack+{-# DEPRECATED fpToTextWarn "Use pack" #-}  -- | Translates a 'FilePath' to a 'Text' --@@ -489,9 +487,8 @@ -- a filename will translate properly into a 'Text'. -- If you created the filename, this should be the case. fpToTextEx :: FilePath -> Text-fpToTextEx fp = either (const $ error errorMsg) id $ F.toText fp-  where-    errorMsg = "fpToTextEx: non-unicode filepath: " ++ F.encodeString fp+fpToTextEx = pack+{-# DEPRECATED fpToTextEx "Use pack" #-}  -- | Translates a 'FilePath' to a 'Text' -- This translation is not correct for a (unix) filename@@ -502,10 +499,12 @@ -- If you control or otherwise understand the filenames -- and believe them to be unicode valid consider using 'fpToTextEx' or 'fpToTextWarn' fpToText :: FilePath -> Text-fpToText = either id id . F.toText+fpToText = pack+{-# DEPRECATED fpToText "Use pack" #-}  fpFromText :: Text -> FilePath-fpFromText = F.fromText+fpFromText = unpack+{-# DEPRECATED fpFromText "Use unpack" #-}  -- Below is a lot of coding for classy-prelude! -- These functions are restricted to lists right now.
classy-prelude.cabal view
@@ -1,5 +1,5 @@ name:                classy-prelude-version:             0.11.1.1+version:             0.12.0 synopsis:            A typeclass-based Prelude. description:         Modern best practices without name collisions. No partial functions are exposed, but modern data structures are, without requiring import lists. Qualified modules also are not needed: instead operations are based on type-classes from the mono-traversable package. @@ -16,8 +16,7 @@ library   exposed-modules:     ClassyPrelude   build-depends:       base                          >= 4          && < 5-                     , basic-prelude                 >= 0.3.10     && < 0.4-                     , system-filepath               >= 0.4        && < 0.5+                     , basic-prelude                 >= 0.4        && < 0.5                      , transformers                      , containers                    >= 0.4.2                      , text