From: Michael Orlitzky Date: Wed, 6 Jul 2016 21:33:43 +0000 (-0400) Subject: Add full lists for every existing import. X-Git-Tag: 0.4.0~20 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=6b71fc1e444cc95acdef91ad814e4f97b01ec52e;p=hath.git Add full lists for every existing import. --- diff --git a/src/Cidr.hs b/src/Cidr.hs index 5c05ed1..5a5ba3f 100644 --- a/src/Cidr.hs +++ b/src/Cidr.hs @@ -25,7 +25,7 @@ import Data.Maybe (catMaybes, mapMaybe) import Test.Tasty ( TestTree, testGroup ) import Test.Tasty.HUnit ( (@?=), testCase ) import Test.Tasty.QuickCheck ( - Arbitrary(..), + Arbitrary( arbitrary ), Gen, Property, (==>), @@ -33,10 +33,12 @@ import Test.Tasty.QuickCheck ( import Text.Read (readMaybe) import qualified Bit as B (Bit(..)) -import IPv4Address (IPv4Address(..), most_sig_bit_different) -import Maskable (Maskable(..)) -import Maskbits (Maskbits(..)) -import Octet (Octet(..)) +import IPv4Address ( + IPv4Address( IPv4Address, octet1, octet2, octet3, octet4 ), + most_sig_bit_different ) +import Maskable (Maskable(apply_mask)) +import Maskbits ( Maskbits(Zero) ) +import Octet (Octet()) data Cidr = Cidr { ipv4address :: IPv4Address, diff --git a/src/IPv4Address.hs b/src/IPv4Address.hs index fca1d0f..6985944 100644 --- a/src/IPv4Address.hs +++ b/src/IPv4Address.hs @@ -9,15 +9,21 @@ where 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, diff --git a/src/Main.hs b/src/Main.hs index 26d54d1..8fce2f5 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -21,7 +21,9 @@ import Cidr ( min_octet2, min_octet3, min_octet4 ) -import CommandLine (Args(..), get_args) +import CommandLine( + Args( Regexed, Reduced, Duped, Diffed, Listed, barriers ), + get_args ) import ExitCodes ( exit_invalid_cidr ) import Octet () diff --git a/src/Maskbits.hs b/src/Maskbits.hs index 27fa29f..39a15b3 100644 --- a/src/Maskbits.hs +++ b/src/Maskbits.hs @@ -2,7 +2,7 @@ module Maskbits( Maskbits(..) ) where -import Test.Tasty.QuickCheck ( Arbitrary(..), elements ) +import Test.Tasty.QuickCheck ( Arbitrary(arbitrary), elements ) -- | A type representing the number of bits in a CIDR netmask. diff --git a/src/Octet.hs b/src/Octet.hs index fa004c5..248b339 100644 --- a/src/Octet.hs +++ b/src/Octet.hs @@ -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 diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 468afeb..32b81e2 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,8 +1,10 @@ -import Test.Tasty ( TestTree, defaultMain, localOption, testGroup ) -import Test.Tasty.QuickCheck ( QuickCheckTests(..), QuickCheckMaxRatio(..) ) -import Cidr ( cidr_properties, cidr_tests ) -import IPv4Address ( ipv4address_properties, ipv4address_tests ) -import Octet ( octet_properties, octet_tests ) +import Test.Tasty( TestTree, defaultMain, localOption, testGroup ) +import Test.Tasty.QuickCheck( + QuickCheckTests( QuickCheckTests), + QuickCheckMaxRatio( QuickCheckMaxRatio )) +import Cidr( cidr_properties, cidr_tests ) +import IPv4Address( ipv4address_properties, ipv4address_tests ) +import Octet( octet_properties, octet_tests ) tests :: TestTree tests = testGroup "All Tests" [