]> gitweb.michael.orlitzky.com - hath.git/blobdiff - src/Octet.hs
Add full lists for every existing import.
[hath.git] / src / Octet.hs
index 4664d1964c21eefcc9aaf0fb32452ab42fd9fd0e..248b3396c40f46ebac61dda9008dc8bb4e9b1ba0 100644 (file)
@@ -7,15 +7,16 @@ where
 import Test.Tasty ( TestTree, testGroup )
 import Test.Tasty.HUnit ( (@?=), testCase )
 import Test.Tasty.QuickCheck (
-  Arbitrary(..),
+  Arbitrary( arbitrary ),
   Gen,
   Property,
   (==>),
   testProperty )
 
-import Bit as B (Bit(..))
-import Maskable (Maskable(..))
-import Maskbits (Maskbits(..))
+import Bit as B( Bit( Zero, One) )
+import Maskable( Maskable( apply_mask) )
+import Maskbits(
+  Maskbits( Zero, One, Two, Three, Four, Five, Six, Seven, Eight ) )
 
 -- | An Octet consists of eight bits. For our purposes, the most
 --   significant bit will come "first." That is, b1 is in the 2^7
@@ -195,7 +196,7 @@ test_octet_from_int1 =
   where
     desc = "octet_from_int 128 should parse as 10000000"
     expected = Octet B.One B.Zero B.Zero B.Zero B.Zero B.Zero B.Zero B.Zero
-    actual = toEnum 128
+    actual = toEnum 128 :: Octet
 
 
 test_octet_mask1 :: TestTree
@@ -204,7 +205,7 @@ test_octet_mask1 =
   where
     desc = "The network bits of 255/4 should equal 240"
     expected = toEnum 240 :: Octet
-    actual = apply_mask (toEnum 255) Four B.Zero
+    actual = apply_mask (toEnum 255) Four B.Zero :: Octet
 
 
 test_octet_mask2 :: TestTree
@@ -213,4 +214,4 @@ test_octet_mask2 =
   where
     desc = "The network bits of 255/1 should equal 128"
     expected = toEnum 128 :: Octet
-    actual = apply_mask (toEnum 255) Maskbits.One B.Zero
+    actual = apply_mask (toEnum 255) Maskbits.One B.Zero :: Octet