import Test.Tasty ( TestTree, testGroup )
import Test.Tasty.HUnit ( (@?=), testCase )
import Test.Tasty.QuickCheck (
- Arbitrary(..),
+ Arbitrary( arbitrary ),
Gen,
Property,
(==>),
testProperty )
-import Maskable (Maskable(..))
-import Maskbits (Maskbits(..))
-import Octet (Octet(..))
+import Maskable ( Maskable( apply_mask) )
+import Maskbits (
+ Maskbits(
+ Zero, One, Two, Three, Four, Five, Six, Seven, Eight,
+ Nine, Ten, Eleven, Twelve, Thirteen, Fourteen, Fifteen, Sixteen,
+ Seventeen, Eighteen, Nineteen, Twenty, TwentyOne, TwentyTwo, TwentyThree,
+ TwentyFour, TwentyFive, TwentySix, TwentySeven, TwentyEight, TwentyNine,
+ Thirty, ThirtyOne, ThirtyTwo ) )
+import Octet ( Octet( b1, b2, b3, b4, b5, b6, b7, b8) )
data IPv4Address =
IPv4Address { octet1 :: Octet,
octet2 :: Octet,
octet3 :: Octet,
octet4 :: Octet }
- deriving (Eq)
+ deriving (Eq, Ord)
instance Show IPv4Address where