module Maskable where
+import Bit
import Maskbits
-- Any string of bits should be maskable by some number of netmask
-- should return 127.0.0.0, since 127.0.0.1/31 matches both 127.0.0.0
-- and 127.0.0.1. In this case, the final '0' or '1' is the host
-- part of the address. The '127.0.0' is thus the network part.
+--
+-- The Bit argument allows us to specify whether the host bits
+-- should be replaced with either Zero or One.
class Maskable a where
- apply_mask :: a -> Maskbits -> a
+ apply_mask :: a -> Maskbits -> Bit -> a