packages feed

liblawless 0.16.0 → 0.16.1

raw patch · 6 files changed

+83/−11 lines, 6 filesdep +pathtypedep −directorydep ~boomerangdep ~filepathdep ~networkPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: pathtype

Dependencies removed: directory

Dependency ranges changed: boomerang, filepath, network

API changes (from Hackage documentation)

+ Text.IO: appendFile :: AbsRel ar => FilePath ar -> Text -> IO ()
+ Text.IO: getLine :: IO Text
+ Text.IO: hGetLine :: Handle -> IO Text
+ Text.IO: hPutStr :: Handle -> Text -> IO ()
+ Text.IO: hPutStrLn :: Handle -> Text -> IO ()
+ Text.IO: putStr :: Text -> IO ()
+ Text.IO: putStrLn :: Text -> IO ()
+ Text.IO: readFile :: AbsRel ar => FilePath ar -> IO Text
+ Text.IO: writeFile :: AbsRel ar => FilePath ar -> Text -> IO ()
- Temporary: withTempHandle :: (MonadIO m, MonadMask m) => FilePath -> (Handle -> m a) -> m a
+ Temporary: withTempHandle :: (MonadIO m, MonadMask m) => RelFile -> (Handle -> m a) -> m a

Files

+ Source/IO.hs view
@@ -0,0 +1,17 @@+{-|+Module:             IO+Description:        General IO functions.+Copyright:          © 2016 All rights reserved.+License:            GPL-3+Maintainer:         Evan Cofsky <>+Stability:          experimental+Portability:        POSIX+-}++module IO (+    module System.Path.Directory,+    module System.Path.IO+    ) where++import System.Path.Directory+import System.Path.IO
+ Source/Path.hs view
@@ -0,0 +1,15 @@+{-|+Module:             Path+Description:        Provides pathtype exports for paths and I/O.+Copyright:          © 2016 All rights reserved.+License:            GPL-3+Maintainer:         Evan Cofsky <>+Stability:          experimental+Portability:        POSIX+-}++module Path (+    module System.Path+    ) where++import System.Path
Source/Temporary.hs view
@@ -15,13 +15,13 @@ import Control.Monad.IO.Class import System.IO import Control.Monad.Catch-import System.FilePath+import Path  -- | Run a function with a temporary file handle named after the -- passed name. Ensures the handle is unbuffered and in binary mode.-withTempHandle ∷ (MonadIO m, MonadMask m) ⇒ FilePath → (Handle → m a) → m a+withTempHandle ∷ (MonadIO m, MonadMask m) ⇒ RelFile → (Handle → m a) → m a withTempHandle name f =-    T.withSystemTempFile (name <> "XXXXXXXXXXXXXXXX")+    T.withSystemTempFile ((toString name) <> "XXXXXXXXXXXXXXXX")     $ \_ h →           -- Make sure the handle is strictly binary with no buffering.           liftIO (hSetBuffering h NoBuffering) >>
+ Source/Text/IO.hs view
@@ -0,0 +1,37 @@+{-|+Module:             Text.IO+Description:        IO for Text handling.+Copyright:          © 2016 All rights reserved.+License:            GPL-3+Maintainer:         Evan Cofsky <>+Stability:          experimental+Portability:        POSIX+-}++module Text.IO (+    readFile,+    writeFile,+    appendFile,+    TIO.hGetLine,+    TIO.hPutStr,+    TIO.hPutStrLn,+    TIO.getLine,+    TIO.putStr,+    TIO.putStrLn+    ) where++import System.IO (IO)+import Prelude.Unicode ((∘))+import Path+import qualified Data.Text.IO as TIO+import Data.Text (Text)+import qualified System.Path.PartClass as Class++readFile ∷ Class.AbsRel ar ⇒ FilePath ar → IO Text+readFile = TIO.readFile ∘ toString++writeFile ∷ Class.AbsRel ar ⇒ FilePath ar → Text → IO ()+writeFile = TIO.writeFile ∘ toString++appendFile ∷ Class.AbsRel ar ⇒ FilePath ar → Text → IO ()+appendFile = TIO.appendFile ∘ toString
Tests/TestTemporary.hs view
@@ -25,10 +25,11 @@ import System.IO hiding (utf8) import Test.QuickCheck.Monadic import Data.Text.Encoding (encodeUtf8)+import Path  prop_CheckBuffering (line ∷ Text) = monadicIO $ do     let l = encodeUtf8 line-    m ← run $ withTempHandle "testTemp" $ \h → do+    m ← run $ withTempHandle (relFile "testTemp") $ \h → do         B.hPut h l         hSeek h AbsoluteSeek 0         B.hGetContents h
liblawless.cabal view
@@ -1,5 +1,5 @@ name:                liblawless-version:             0.16.0+version:             0.16.1 synopsis:            Prelude based on protolude for GHC 8 and beyond. license:             GPL-3 license-file:        LICENSE@@ -27,7 +27,7 @@ source-repository this   type:     git   location:   location: git+ssh://lambdanow.us/projects/haskellnow/liblawless.git-  tag: v0.16.0+  tag: v0.16.1  library   exposed-modules:@@ -36,14 +36,17 @@                   Boomerang                   Exception                   Generics+                  IO                   Lawless                   Machine                   Map                   Networking                   Parser+                  Path                   Set                   Temporary                   Text+                  Text.IO                   Textual                   Textual.SepList                   Time@@ -72,27 +75,26 @@                      TypeSynonymInstances   build-depends:                 aeson                      >= 0.11.2 && < 0.12,-                base >=4.9 && <4.10,+                base                       >=4.9 && <4.10,                 base-unicode-symbols       >= 0.2.2 && < 0.3,                 binary                     >= 0.8.3 && < 0.9,-                boomerang,+                boomerang                  >= 1.4.5.2 && < 1.5,                 bytestring                 >= 0.10.8 && < 0.11,                 containers                 >= 0.5.7 && < 0.6,                 containers-unicode-symbols >= 0.3.1 && < 0.4,                 contravariant              >= 1.4 && < 1.5,                 data-default               >= 0.7.1.1 && < 0.8,                 data-textual               >= 0.3.0 && < 0.4,-                directory                  >= 1.2.6 && < 1.3,                 dns                        >= 2.0.8 && < 2.1,                 exceptions                 >= 0.8.3 && < 0.9,-                filepath                   >= 1.4.1 && < 1.5,                 hjsonschema                >= 1.2.0 && < 1.3,                 lens                       >= 4.14 && < 4.15,                 machines                   >= 0.6.1 && < 0.7,                 mtl                        >= 2.2.1 && < 2.3,-                network >= 2.6.3.1,+                network                    >= 2.6.3.1 && < 2.7,                 network-ip                 >= 0.3 && < 0.4,                 parsers                    >= 0.12.4 && < 0.13,+                pathtype                   >= 0.8 && < 0.9,                 protolude                  >= 0.1.10 && < 0.2,                 random                     >= 1.1 && < 1.2,                 semigroups                 >= 0.18.2 && < 0.19,