MissingH 1.4.2.1 → 1.4.3.0
raw patch · 48 files changed
+125/−19 lines, 48 filesdep +network-bsddep ~arraydep ~basedep ~containerssetup-changedPVP ok
version bump matches the API change (PVP)
Dependencies added: network-bsd
Dependency ranges changed: array, base, containers, directory, filepath, hslogger, network, old-time, process, random, time, unix
API changes (from Hackage documentation)
+ Data.Tuple.Utils: dup :: a -> (a, a)
+ Data.Tuple.Utils: triple :: a -> (a, a, a)
Files
- CHANGES.md +5/−0
- MissingH.cabal +23/−12
- Setup.hs +0/−2
- src/Control/Concurrent/Thread/Utils.hs +1/−0
- src/Data/BinPacking.hs +1/−0
- src/Data/Bits/Utils.hs +1/−0
- src/Data/CSV.hs +1/−0
- src/Data/Compression/Inflate.hs +1/−0
- src/Data/Either/Utils.hs +1/−0
- src/Data/Hash/CRC32/GZip.hs +1/−0
- src/Data/Hash/MD5.hs +2/−0
- src/Data/Hash/MD5/Zord64_HARD.hs +2/−0
- src/Data/List/Utils.hs +1/−0
- src/Data/MIME/Types.hs +2/−0
- src/Data/Map/Utils.hs +1/−0
- src/Data/Maybe/Utils.hs +1/−0
- src/Data/Progress/Meter.hs +2/−0
- src/Data/Progress/Tracker.hs +1/−0
- src/Data/Quantity.hs +1/−0
- src/Data/String/Utils.hs +2/−0
- src/Data/Tuple/Utils.hs +14/−0
- src/Network/Email/Mailbox.hs +1/−0
- src/Network/Email/Sendmail.hs +1/−0
- src/Network/SocketServer.hs +2/−0
- src/Network/Utils.hs +4/−3
- src/System/Cmd/Utils.hs +9/−0
- src/System/Console/GetOpt/Utils.hs +1/−0
- src/System/Daemon.hs +1/−0
- src/System/Debian/ControlParser.hs +2/−0
- src/System/FileArchive/GZip.hs +1/−0
- src/System/IO/Binary.hs +2/−0
- src/System/IO/HVFS.hs +9/−0
- src/System/IO/HVFS/Combinators.hs +1/−1
- src/System/IO/HVFS/InstanceHelpers.hs +1/−0
- src/System/IO/HVFS/Utils.hs +1/−0
- src/System/IO/HVIO.hs +2/−0
- src/System/IO/PlafCompat.hs +1/−0
- src/System/IO/StatCompat.hs +1/−0
- src/System/IO/Utils.hs +2/−0
- src/System/IO/WindowsCompat.hs +5/−1
- src/System/Path.hs +1/−0
- src/System/Path/Glob.hs +2/−0
- src/System/Path/NameManip.hs +1/−0
- src/System/Path/WildMatch.hs +2/−0
- src/System/Posix/Consts.hs +1/−0
- src/System/Time/Utils.hs +1/−0
- src/Text/ParserCombinators/Parsec/Utils.hs +1/−0
- testsrc/TestUtils.hs +5/−0
CHANGES.md view
@@ -1,3 +1,8 @@+### 1.4.3.0++- New tuple construction helpers `Data.Tuple.Utils.dup` and `Data.Tuple.Utils.triple`+- Close sockets on connection failure in `connectTCPAddr` ([#50](https://github.com/haskell-hvr/missingh/issues/50))+ ### 1.4.2.1 - GHC 7.0 only compat release
MissingH.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: MissingH-version: 1.4.2.1+version: 1.4.3.0 build-type: Simple license: BSD3@@ -36,6 +36,11 @@ examples/test2.hs examples/test3.hs +flag network--GE-3_0_0+ description: [network](http://hackage.haskell.org/package/network) ≥ 3.0.0+ default: True+ manual: False+ source-repository head type: git location: https://github.com/hvr/missingh.git@@ -101,28 +106,34 @@ UndecidableInstances other-extensions: CPP+ Safe+ Trustworthy TypeSynonymInstances build-depends:- array == 0.3.*- , base == 4.3.*- , containers == 0.4.*- , directory == 1.1.*- , filepath == 1.2.*- , hslogger == 1.3.*+ array >= 0.4.0.0 && < 0.6+ , base >= 4.5.0.0 && < 4.15+ , containers >= 0.4.2.1 && < 0.7+ , directory >= 1.1.0.2 && < 1.4+ , filepath >= 1.3.0.0 && < 1.5+ , hslogger >= 1.3.0.0 && < 1.4 , mtl >= 1.1.1.0 && < 2.3 , old-locale == 1.0.*- , old-time == 1.0.*+ , old-time == 1.1.* , parsec == 3.1.* && (< 3.1.12 || >= 3.1.13)- , process == 1.0.*+ , process >= 1.1.0.1 && < 1.7 , random >= 1.0.1.1 && < 1.2 , regex-compat >= 0.95.1 && < 0.96- , time == 1.2.*+ , time >= 1.4 && < 1.10 - build-depends: network >= 2.6.3.1 && <2.7+ if flag(network--GE-3_0_0)+ build-depends: network-bsd >= 2.8.1 && <2.9,+ network >= 3.0 && <3.2+ else+ build-depends: network >= 2.6.3.1 && <2.9 If !os(windows)- Build-Depends: unix >= 2.4.2 && < 2.5+ Build-Depends: unix >= 2.5.1.0 && < 2.8 ghc-options: -fno-warn-deprecations
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
src/Control/Concurrent/Thread/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Thread utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/BinPacking.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Copyright (c) 2008-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Bits/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Bit utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/CSV.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: CSV and TSV utilities Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Compression/Inflate.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} -- arch-tag: Inflate implementation for Haskell {-
src/Data/Either/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Either utilities Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Hash/CRC32/GZip.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: GZIP CRC32 implementation in pure Haskell Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Hash/MD5.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {-# OPTIONS_GHC -fno-warn-missing-methods #-} {- |
src/Data/Hash/MD5/Zord64_HARD.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {-# OPTIONS_HADDOCK hide #-} {-# OPTIONS_GHC -fno-warn-missing-methods #-}
src/Data/List/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: List utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/MIME/Types.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {- arch-tag: MIME Types main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Map/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Maybe/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Maybe utilities Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Progress/Meter.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {- Copyright (c) 2006-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Progress/Tracker.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Copyright (c) 2006-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Quantity.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Copyright (c) 2006-2011 John Goerzen <jgoerzen@complete.org>
src/Data/String/Utils.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Trustworthy #-}+ {- arch-tag: String utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Data/Tuple/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Tuple utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org> @@ -20,10 +21,23 @@ -} module Data.Tuple.Utils(+ -- * Construction+ dup, triple, -- * Extraction fst3, snd3, thd3 ) where +-- | Construct a pair by duplication of a single value+--+-- @since 1.4.3.0+dup :: a -> (a,a)+dup a = (a,a)++-- | Construct a 3-tuple from a single value+--+-- @since 1.4.3.0+triple :: a -> (a,a,a)+triple a = (a,a,a) -- | Take the first item out of a 3 element tuple fst3 :: (a,b,c) -> a
src/Network/Email/Mailbox.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/Network/Email/Sendmail.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Safe #-} {- arch-tag: Sendmail utility Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Network/SocketServer.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Trustworthy #-}+ {- arch-tag: Generic Server Support Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Network/Utils.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Trustworthy #-} {- arch-tag: Network utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>@@ -31,6 +32,7 @@ #if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import qualified System.Posix.Signals #endif+import Control.Exception (bracketOnError) {- | Sets up the system for networking. Similar to the built-in withSocketsDo (and actually, calls it), but also sets the SIGPIPE@@ -62,9 +64,8 @@ connectTCPAddr :: SockAddr -> IO Socket connectTCPAddr addr = do proto <- getProtocolNumber "tcp"- s <- socket AF_INET Stream proto- connect s addr- return s+ bracketOnError (socket AF_INET Stream proto) close+ (\s -> connect s addr >> return s) listenTCPAddr :: SockAddr -> Int -> IO Socket listenTCPAddr addr queuelen = do
src/System/Cmd/Utils.hs view
@@ -1,5 +1,6 @@ -- arch-tag: Command utilities main file {-# LANGUAGE CPP #-}+{-# LANGUAGE Trustworthy #-} {- Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>@@ -325,7 +326,11 @@ Just (Exited (ExitSuccess)) -> return () Just (Exited (ExitFailure fc)) -> cmdfailed funcname fp args fc+#if MIN_VERSION_unix(2,7,0)+ Just (Terminated sig _) ->+#else Just (Terminated sig) ->+#endif warnfail fp args $ "Terminated by signal " ++ show sig Just (Stopped sig) -> warnfail fp args $ "Stopped by signal " ++ show sig@@ -351,7 +356,11 @@ case ec of Exited ExitSuccess -> return () Exited (ExitFailure fc) -> cmdfailed "safeSystem" command args fc+#if MIN_VERSION_unix(2,7,0)+ Terminated s _ -> cmdsignalled "safeSystem" command args s+#else Terminated s -> cmdsignalled "safeSystem" command args s+#endif Stopped s -> cmdsignalled "safeSystem" command args s #endif
src/System/Console/GetOpt/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/System/Daemon.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Trustworthy #-} {- Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/System/Debian/ControlParser.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {- arch-tag: Parser for Debian control file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/FileArchive/GZip.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: GZip file support in Haskell Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/Binary.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Trustworthy #-}+ {- arch-tag: I/O utilities, binary tools Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/HVFS.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP, TypeSynonymInstances #-}+{-# LANGUAGE Trustworthy #-} {- arch-tag: HVFS main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org> @@ -61,6 +62,10 @@ import System.Time import qualified System.Directory as D +#if MIN_VERSION_directory(1,2,0)+import Data.Time.Clock.POSIX ( utcTimeToPOSIXSeconds )+#endif+ {- | Encapsulate a 'HVFSStat' result. This is required due to Haskell typing restrictions. You can get at it with: @@ -304,7 +309,11 @@ vGetSymbolicLinkStatus = vGetFileStatus #endif +#if MIN_VERSION_directory(1,2,0)+ vGetModificationTime _ p = D.getModificationTime p >>= (\modUTCTime -> return $ TOD ((toEnum . fromEnum . utcTimeToPOSIXSeconds) modUTCTime) 0)+#else vGetModificationTime _ = D.getModificationTime+#endif #if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) vCreateSymbolicLink _ = createSymbolicLink vReadSymbolicLink _ = readSymbolicLink
src/System/IO/HVFS/Combinators.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-}-+{-# LANGUAGE Safe #-} {- arch-tag: HVFS Combinators Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/HVFS/InstanceHelpers.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: HVFS instance helpers Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/HVFS/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Trustworthy #-} {- arch-tag: HVFS utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/HVIO.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {- arch-tag: HVIO main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/PlafCompat.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Safe #-} {- Platform Compatibility Layer Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/StatCompat.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Safe #-} {- Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/Utils.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Trustworthy #-}+ {- Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/IO/WindowsCompat.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-}-+{-# LANGUAGE Safe #-} {- Windows compatibility layer Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org> @@ -125,7 +125,11 @@ isdir <- doesDirectoryExist fp perms <- getPermissions fp modct <- getModificationTime fp+#if MIN_VERSION_directory(1,2,0)+ let epochtime = utcTimeToSeconds modct+#else let epochtime = clockTimeToEpoch modct+#endif return $ FileStatusCompat {deviceID = -1, fileID = -1, fileMode = if isfile then regularFileMode
src/System/Path.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Safe #-} {- arch-tag: Path utilities main file Copyright (C) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/System/Path/Glob.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Safe #-}+ {- Copyright (c) 2006-2011 John Goerzen <jgoerzen@complete.org>
src/System/Path/NameManip.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- | Module : System.Path.NameManip Copyright : Copyright (C) 2004 Volker Wysk
src/System/Path/WildMatch.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE Trustworthy #-}+ {- Copyright (c) 2006-2011 John Goerzen <jgoerzen@complete.org>
src/System/Posix/Consts.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- Posix consts not included with Haskell Copyright (c) 2005-2011 John Goerzen <jgoerzen@complete.org>
src/System/Time/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Time utilities main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
src/Text/ParserCombinators/Parsec/Utils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Safe #-} {- arch-tag: Parsec utilities Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org>
testsrc/TestUtils.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ module TestUtils (mapassertEqual, assertRaises, errorCallMsg) where import Control.Exception (ErrorCall (..), Exception,@@ -27,3 +29,6 @@ errorCallMsg :: ErrorCall -> String errorCallMsg (ErrorCall msg) = msg+#if MIN_VERSION_base(4,9,0)+errorCallMsg (ErrorCallWithLocation msg _) = msg+#endif