Implemented the combine_all function for Cidrs containing one another.
Removed the 'contains' export from the Cidr module.
Added a 'contains_proper' convenience function.
Added a new Maskable typeclass with instances Octet and IPv4Address.
Export octet[1-4] from IPv4Address.
Implemented a new 'contains' function for Cidrs using the Maskable class' apply_mask function.
Removed the Text.Regex.Posix import.
Removed the is_valid_cidr function.
Send each octet/maskbit string to the appropriate module for parsing.
Return Cidr.None if either the octets or maskbits are invalid.
Add a None constructor for IPv4Address.
Hide the constructor for IPv4Address.
Created an ipv4address_from_octets function which mimics the constructor but will return IPv4Address.None in response to being passed Octet.Nones.
Michael Orlitzky [Fri, 30 Apr 2010 22:56:00 +0000 (18:56 -0400)]
Add mode parsing to the CommandLine module.
Separate the parse_errors, parse_options, and parse_mode functions.
Add a second mode of operation, Reduce (currently echoes its input).
Michael Orlitzky [Thu, 29 Apr 2010 02:20:56 +0000 (22:20 -0400)]
Add a CommandLine module for parsing command-line options.
Update the Main module to use the new CommandLine module.
Implement an input file option (to override stdin).
Michael Orlitzky [Thu, 22 Apr 2010 00:48:59 +0000 (20:48 -0400)]
Moved most of the CIDR code out of Main and in to a new Cidr module.
Created a Cidr data type to handle four-tuples of octets.
Modified all of the function signatures to use the new Cidr data type.