summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenHamlin <>2017-03-26 01:20:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-03-26 01:20:00 (GMT)
commit00af3820100de24e46bc40c35dae2910fd9507ca (patch)
tree35b573119233deb4c108f1ea742679eb1097da4d
parente70851920b25b069303b57c06c355d39ff80bd7e (diff)
version 0.1.0.10.1.0.1
-rw-r--r--ChangeLog.md6
-rw-r--r--rtnetlink.cabal10
-rw-r--r--src/System/Linux/RTNetlink.hs4
-rw-r--r--src/System/Linux/RTNetlink/Address.hsc2
-rw-r--r--src/System/Linux/RTNetlink/Link.hsc1
-rw-r--r--src/System/Linux/RTNetlink/Message.hsc3
-rw-r--r--src/System/Linux/RTNetlink/Packet.hsc4
-rw-r--r--src/System/Socket/Family/Netlink.hsc1
-rw-r--r--tests/Main.hs3
9 files changed, 24 insertions, 10 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index c1abd29..5e6ccbc 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
# Revision history for rtnetlink
-## 0.1.0.0 -- YYYY-mm-dd
+## 0.1.0.1 -- 2017-03-25
+
+* Provide support for base-4.7.\*
+
+## 0.1.0.0 -- 2017-03-24
* First version. Released on an unsuspecting world.
diff --git a/rtnetlink.cabal b/rtnetlink.cabal
index 9f327de..7334d3c 100644
--- a/rtnetlink.cabal
+++ b/rtnetlink.cabal
@@ -1,5 +1,5 @@
name: rtnetlink
-version: 0.1.0.0
+version: 0.1.0.1
synopsis: Manipulate network devices, addresses, and routes on Linux
description: A high-level, extensible, pure Haskell interface to the
ROUTE_NETLINK subsystem of netlink for manipulating
@@ -31,7 +31,7 @@ test-suite rtnetlink-tests
hs-source-dirs: tests
main-is: Main.hs
build-depends:
- base >=4.9 && <4.10,
+ base >=4.7 && <4.10,
hspec >=2.4 && <2.5,
socket >=0.8 && <0.9,
unix >=2.7 && <2.8,
@@ -40,7 +40,7 @@ test-suite rtnetlink-tests
executable rtnl-link
if flag(examples)
build-depends:
- base >=4.9 && <4.10,
+ base >=4.7 && <4.10,
bytestring >=0.10 && <0.11,
rtnetlink
else
@@ -51,7 +51,7 @@ executable rtnl-link
executable rtnl-address
if flag(examples)
build-depends:
- base >=4.9 && <4.10,
+ base >=4.7 && <4.10,
socket >=0.8 && <0.9,
split >=0.2 && <0.3,
rtnetlink
@@ -80,7 +80,7 @@ library
RecordWildCards,
TypeFamilies
build-depends:
- base >=4.9 && <4.10,
+ base >=4.7 && <4.10,
bytestring >=0.10 && <0.11,
cereal >=0.5 && <0.6,
monad-loops >=0.4 && <0.5,
diff --git a/src/System/Linux/RTNetlink.hs b/src/System/Linux/RTNetlink.hs
index 39c7ec6..fe05b36 100644
--- a/src/System/Linux/RTNetlink.hs
+++ b/src/System/Linux/RTNetlink.hs
@@ -70,11 +70,13 @@ module System.Linux.RTNetlink (
, liftIO
) where
+import Control.Applicative (Applicative(..), (<$>))
import Control.Monad (when, void)
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Loops (unfoldM)
import Control.Monad.State (MonadState, StateT, evalStateT)
import Control.Monad.State (get, gets, put, modify, modify')
+import Data.Monoid (mempty)
import Data.Either (partitionEithers)
import Data.List (partition)
import Data.Serialize (encode)
@@ -107,7 +109,7 @@ newtype RTNL a = RTNL {unRTNL :: StateT Handle IO a}
-- | Run an RTNL function and catch all @IOError@s. This means that functions
-- in this module are guaranteed not to throw uncaught exceptions.
tryRTNL :: RTNL a -> IO (Either String a)
-tryRTNL = fmap (left (\e -> X.displayException (e::IOError))) . X.try . runRTNL
+tryRTNL = fmap (left (\e -> show (e::IOError))) . X.try . runRTNL
-- | Run an RTNL function. RTNL functions in this module throw exclusively
-- @IOError@s.
diff --git a/src/System/Linux/RTNetlink/Address.hsc b/src/System/Linux/RTNetlink/Address.hsc
index 9b5d164..be4d62e 100644
--- a/src/System/Linux/RTNetlink/Address.hsc
+++ b/src/System/Linux/RTNetlink/Address.hsc
@@ -26,7 +26,9 @@ module System.Linux.RTNetlink.Address
, Inet6Address
) where
+import Control.Applicative ((<$>), (<*>))
import Control.Monad (guard)
+import Data.Monoid (mempty)
import Data.Serialize (Serialize, Get, Putter, get, put, runPut)
import Data.Serialize (getWord32host, putWord32host, getWord8)
import Data.Serialize (putWord8, getWord16be, putWord16be)
diff --git a/src/System/Linux/RTNetlink/Link.hsc b/src/System/Linux/RTNetlink/Link.hsc
index aa0ca02..289e793 100644
--- a/src/System/Linux/RTNetlink/Link.hsc
+++ b/src/System/Linux/RTNetlink/Link.hsc
@@ -17,6 +17,7 @@ Portability : Linux
{-# LANGUAGE TypeFamilies #-}
module System.Linux.RTNetlink.Link where
+import Control.Applicative ((<$>), (<*>))
import Data.Bits ((.&.))
import Data.Int (Int32)
import Data.Monoid ((<>))
diff --git a/src/System/Linux/RTNetlink/Message.hsc b/src/System/Linux/RTNetlink/Message.hsc
index 8749481..b0d7017 100644
--- a/src/System/Linux/RTNetlink/Message.hsc
+++ b/src/System/Linux/RTNetlink/Message.hsc
@@ -28,10 +28,11 @@ to perform.
{-# LANGUAGE TypeFamilies #-}
module System.Linux.RTNetlink.Message where
+import Control.Applicative ((<$>), (<*>))
import Control.Monad (guard)
-import Data.Monoid (mempty)
import Data.Int (Int32)
import Data.List (nub)
+import Data.Monoid (mempty)
import Data.Serialize
import Data.Word (Word16, Word32)
import qualified Data.ByteString as S
diff --git a/src/System/Linux/RTNetlink/Packet.hsc b/src/System/Linux/RTNetlink/Packet.hsc
index 7f273d8..428526a 100644
--- a/src/System/Linux/RTNetlink/Packet.hsc
+++ b/src/System/Linux/RTNetlink/Packet.hsc
@@ -33,15 +33,17 @@ module System.Linux.RTNetlink.Packet (
, putAligned
) where
+import Control.Applicative ((<$>), (<*>))
import Control.Monad (guard)
import Control.Monad.Loops (unfoldM)
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Maybe (runMaybeT)
import Data.Bits ((.|.), (.&.), xor)
import Data.List (unfoldr, find)
+import Data.Maybe (listToMaybe)
+import Data.Monoid (Monoid, mempty, mappend)
import Data.Serialize
import Data.Word (Word16,Word32)
-import Data.Maybe (listToMaybe)
import qualified Data.ByteString as S
#include <linux/netlink.h>
diff --git a/src/System/Socket/Family/Netlink.hsc b/src/System/Socket/Family/Netlink.hsc
index ea06510..41d8d9c 100644
--- a/src/System/Socket/Family/Netlink.hsc
+++ b/src/System/Socket/Family/Netlink.hsc
@@ -22,6 +22,7 @@ module System.Socket.Family.Netlink
) where
import Data.Bits ((.|.))
+import Data.Functor ((<$>))
import Data.Serialize (Serialize(..), encode, decode)
import Data.Serialize (putWord16host, putWord32host, getWord16host, getWord32host)
import Foreign.Ptr (castPtr)
diff --git a/tests/Main.hs b/tests/Main.hs
index 1b0344f..aac107e 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -2,9 +2,10 @@
module Main where
import Control.Exception (bracket)
+import Data.Functor ((<$>))
+import System.Posix (getEffectiveUserID)
import System.Socket.Family.Inet (inetAddressFromTuple)
import System.Socket.Family.Inet6 (inet6AddressFromTuple)
-import System.Posix (getEffectiveUserID)
import Test.Hspec