]> gitweb.michael.orlitzky.com - hath.git/log
hath.git
10 years agoAdd hlint makefile target. 0.0.1
Michael Orlitzky [Sat, 8 Jun 2013 17:38:06 +0000 (13:38 -0400)]
Add hlint makefile target.
Fix hlint suggestions.

10 years agoAdd category: Utils to cabal file.
Michael Orlitzky [Sat, 8 Jun 2013 16:34:40 +0000 (12:34 -0400)]
Add category: Utils to cabal file.

10 years agoPHONY the dist make target.
Michael Orlitzky [Sat, 8 Jun 2013 16:28:15 +0000 (12:28 -0400)]
PHONY the dist make target.
Change license to GPL3.
Add license field to cabal file.

10 years agoAdd a description to the cabal file.
Michael Orlitzky [Sat, 8 Jun 2013 16:20:18 +0000 (12:20 -0400)]
Add a description to the cabal file.

10 years agoFix escaping in a comment.
Michael Orlitzky [Fri, 7 Jun 2013 22:48:51 +0000 (18:48 -0400)]
Fix escaping in a comment.

10 years agoAdd a 'doc' makefile target.
Michael Orlitzky [Fri, 7 Jun 2013 22:46:43 +0000 (18:46 -0400)]
Add a 'doc' makefile target.

10 years agoAdd more Haddock comments.
Michael Orlitzky [Fri, 7 Jun 2013 22:18:10 +0000 (18:18 -0400)]
Add more Haddock comments.
Replace a few custom functions with library ones.
Allow input CIDRs to be separated by any whitespace, not just newlines.
Split the exit codes out into their own module.
Remove now-unused ListUtils modules.
Update deps in cabal file.
Add a man page.

10 years agoUse Cabal test integration.
Michael Orlitzky [Sun, 21 Apr 2013 16:41:57 +0000 (12:41 -0400)]
Use Cabal test integration.

10 years agoPrepare for version 0.0.1.
Michael Orlitzky [Sun, 21 Apr 2013 16:33:45 +0000 (12:33 -0400)]
Prepare for version 0.0.1.

10 years agoUse test-framework for the tests, and bump some dependencies.
Michael Orlitzky [Sun, 21 Apr 2013 16:24:14 +0000 (12:24 -0400)]
Use test-framework for the tests, and bump some dependencies.

12 years agoRelax the base version requirement.
Michael Orlitzky [Thu, 12 Apr 2012 17:21:59 +0000 (13:21 -0400)]
Relax the base version requirement.

12 years agoGreatly simplify the definition of IPv4Address.apply_mask.
Michael Orlitzky [Tue, 27 Dec 2011 03:52:39 +0000 (22:52 -0500)]
Greatly simplify the definition of IPv4Address.apply_mask.

12 years agoRemove an accidental line break and indentation.
Michael Orlitzky [Tue, 27 Dec 2011 03:38:46 +0000 (22:38 -0500)]
Remove an accidental line break and indentation.

12 years agoRewrite everything to use Maybe instead of None constructors.
Michael Orlitzky [Tue, 27 Dec 2011 03:33:25 +0000 (22:33 -0500)]
Rewrite everything to use Maybe instead of None constructors.
Convert comments to Haddock-style docs in many places.
Whitespace cleanup.

12 years agoCabalize the project.
Michael Orlitzky [Mon, 26 Dec 2011 18:04:41 +0000 (13:04 -0500)]
Cabalize the project.

12 years agoUpdate for QuickCheck 2.
Michael Orlitzky [Mon, 26 Dec 2011 17:58:50 +0000 (12:58 -0500)]
Update for QuickCheck 2.

13 years agoMake combine_all operate recursively.
Michael Orlitzky [Fri, 5 Nov 2010 19:27:41 +0000 (15:27 -0400)]
Make combine_all operate recursively.
Create a new test to test the recursive combine_all.
Add a custom (==) implementation for Cidrs.
Fix an incorrect test.

13 years agoFix four compiler warnings.
Michael Orlitzky [Thu, 2 Sep 2010 16:57:09 +0000 (12:57 -0400)]
Fix four compiler warnings.

13 years agoDon't use min_address or min_octet in the apply_mask functions. Now that apply_mask...
Michael Orlitzky [Sat, 28 Aug 2010 06:08:40 +0000 (02:08 -0400)]
Don't use min_address or min_octet in the apply_mask functions. Now that apply_mask accepts a mask bit, we no longer necessarily want the minimum.

13 years agoFixed one of the new tests (min/max).
Michael Orlitzky [Sat, 28 Aug 2010 06:07:59 +0000 (02:07 -0400)]
Fixed one of the new tests (min/max).

13 years agoAdded two new tests exposing an existing bug.
Michael Orlitzky [Sat, 28 Aug 2010 05:39:37 +0000 (01:39 -0400)]
Added two new tests exposing an existing bug.

13 years agoAdded LICENSE and README files.
Michael Orlitzky [Sat, 28 Aug 2010 04:45:56 +0000 (00:45 -0400)]
Added LICENSE and README files.

13 years agoFixed the maskbits parsing for invalid CIDRs.
Michael Orlitzky [Wed, 28 Jul 2010 18:07:36 +0000 (14:07 -0400)]
Fixed the maskbits parsing for invalid CIDRs.

13 years agoUpdate Cidr for the new definition of apply_mask.
Michael Orlitzky [Sun, 23 May 2010 16:53:11 +0000 (12:53 -0400)]
Update Cidr for the new definition of apply_mask.
Replace min/max_host with one-liners thanks to the new apply_mask.

13 years agoUpdate IPv4Address for the new definition of apply_mask.
Michael Orlitzky [Sun, 23 May 2010 16:52:41 +0000 (12:52 -0400)]
Update IPv4Address for the new definition of apply_mask.

13 years agoUpdate Octet for the new definition of apply_mask.
Michael Orlitzky [Sun, 23 May 2010 16:52:20 +0000 (12:52 -0400)]
Update Octet for the new definition of apply_mask.

13 years agoAllow apply_mask to take a Bit argument that will be used to replace the host bits.
Michael Orlitzky [Sun, 23 May 2010 16:51:26 +0000 (12:51 -0400)]
Allow apply_mask to take a Bit argument that will be used to replace the host bits.

13 years agoUse min_address to simplify some of the min_host cases.
Michael Orlitzky [Sun, 23 May 2010 16:25:15 +0000 (12:25 -0400)]
Use min_address to simplify some of the min_host cases.

13 years agoExport the two new min/max functions.
Michael Orlitzky [Sun, 23 May 2010 16:24:33 +0000 (12:24 -0400)]
Export the two new min/max functions.

13 years agoAdded min/max_address for IPv4Address.
Michael Orlitzky [Sun, 23 May 2010 16:20:39 +0000 (12:20 -0400)]
Added min/max_address for IPv4Address.

13 years agoChanged the long name of "dupe" from "duplicated" to "duped."
Michael Orlitzky [Sat, 22 May 2010 17:35:37 +0000 (13:35 -0400)]
Changed the long name of "dupe" from "duplicated" to "duped."

13 years agoAdded the "diff" mode of operation.
Michael Orlitzky [Sat, 22 May 2010 17:34:49 +0000 (13:34 -0400)]
Added the "diff" mode of operation.

13 years agoStarted updating the max_host function to use record syntax.
Michael Orlitzky [Thu, 20 May 2010 21:21:17 +0000 (17:21 -0400)]
Started updating the max_host function to use record syntax.

13 years agoRenamed the min/max_address functions to min/max_host respectively.
Michael Orlitzky [Thu, 20 May 2010 21:13:43 +0000 (17:13 -0400)]
Renamed the min/max_address functions to min/max_host respectively.

13 years agoMoved the min/max address/octetN functions out of IPv4Address and in to Cidr.
Michael Orlitzky [Thu, 20 May 2010 21:10:59 +0000 (17:10 -0400)]
Moved the min/max address/octetN functions out of IPv4Address and in to Cidr.

13 years agoAdded the 'Dupe' mode of operation.
Michael Orlitzky [Thu, 20 May 2010 20:17:25 +0000 (16:17 -0400)]
Added the 'Dupe' mode of operation.

13 years agoUpdate the min_address function to use record syntax.
Michael Orlitzky [Thu, 20 May 2010 20:03:26 +0000 (16:03 -0400)]
Update the min_address function to use record syntax.

13 years agoMoved the maskable instance definitions within their corresponding modules.
Michael Orlitzky [Thu, 20 May 2010 19:43:34 +0000 (15:43 -0400)]
Moved the maskable instance definitions within their corresponding modules.

13 years agoAdded two tests for combine_all.
Michael Orlitzky [Thu, 20 May 2010 05:13:25 +0000 (01:13 -0400)]
Added two tests for combine_all.

13 years agoUpdated the combine_contains unit tests to actually call combine_contains.
Michael Orlitzky [Thu, 20 May 2010 05:02:42 +0000 (01:02 -0400)]
Updated the combine_contains unit tests to actually call combine_contains.
Changed the test case for the second combine_contains test; the existing one should have failed.

13 years agoAdded the prop_contains_proper_intransitive QuickCheck property, and fixed the defini...
Michael Orlitzky [Fri, 14 May 2010 05:59:06 +0000 (01:59 -0400)]
Added the prop_contains_proper_intransitive QuickCheck property, and fixed the definition of contains_proper when it found a bug.

13 years agoAdded the QuickCheck tests to the test suite.
Michael Orlitzky [Fri, 14 May 2010 05:29:25 +0000 (01:29 -0400)]
Added the QuickCheck tests to the test suite.

13 years agoAdded a QuickCheck property verifying that all Cidrs contain themselves.
Michael Orlitzky [Fri, 14 May 2010 05:20:55 +0000 (01:20 -0400)]
Added a QuickCheck property verifying that all Cidrs contain themselves.

13 years agoAdded Arbitrary instance definitions for the main data types.
Michael Orlitzky [Fri, 14 May 2010 05:16:34 +0000 (01:16 -0400)]
Added Arbitrary instance definitions for the main data types.

13 years agoAdded two tests for combine_contained.
Michael Orlitzky [Fri, 14 May 2010 04:22:12 +0000 (00:22 -0400)]
Added two tests for combine_contained.

13 years agoAdded some adjacency tests.
Michael Orlitzky [Fri, 14 May 2010 04:17:31 +0000 (00:17 -0400)]
Added some adjacency tests.

13 years agoAdded some new Cidr tests.
Michael Orlitzky [Fri, 14 May 2010 04:10:48 +0000 (00:10 -0400)]
Added some new Cidr tests.
Fixed the argument order in the existing Cidr tests.

13 years agoAdded type signatures for all of the tests.
Michael Orlitzky [Mon, 10 May 2010 00:48:13 +0000 (20:48 -0400)]
Added type signatures for all of the tests.

13 years agoAdd some additional GHC warnings to the makefile.
Michael Orlitzky [Mon, 10 May 2010 00:47:47 +0000 (20:47 -0400)]
Add some additional GHC warnings to the makefile.

13 years agoAdded a "test" directory containing the test suite of HUnit tests.
Michael Orlitzky [Sun, 9 May 2010 19:53:05 +0000 (15:53 -0400)]
Added a "test" directory containing the test suite of HUnit tests.

13 years agoAdded a "test" makefile target.
Michael Orlitzky [Sun, 9 May 2010 19:52:54 +0000 (15:52 -0400)]
Added a "test" makefile target.

13 years agoAdded HUnit tests to Octet.
Michael Orlitzky [Sun, 9 May 2010 19:38:53 +0000 (15:38 -0400)]
Added HUnit tests to Octet.

13 years agoAdded HUnit tests for the Maskable instances.
Michael Orlitzky [Sun, 9 May 2010 19:36:00 +0000 (15:36 -0400)]
Added HUnit tests for the Maskable instances.

13 years agoFixed the value of (octet_from_int 128).
Michael Orlitzky [Sun, 9 May 2010 19:34:33 +0000 (15:34 -0400)]
Fixed the value of (octet_from_int 128).

13 years agoSwitched the expected/actual order of assertions in IPv4Address.
Michael Orlitzky [Sun, 9 May 2010 19:27:41 +0000 (15:27 -0400)]
Switched the expected/actual order of assertions in IPv4Address.

13 years agoAdd an HUnit test for Cidr.
Michael Orlitzky [Sun, 9 May 2010 19:23:16 +0000 (15:23 -0400)]
Add an HUnit test for Cidr.

13 years agoAdd two HUnit tests for IPv4Address.
Michael Orlitzky [Sun, 9 May 2010 19:22:48 +0000 (15:22 -0400)]
Add two HUnit tests for IPv4Address.

13 years agoFixed the IPv4Address apply_mask function; the bit order was backwards.
Michael Orlitzky [Sun, 9 May 2010 18:11:36 +0000 (14:11 -0400)]
Fixed the IPv4Address apply_mask function; the bit order was backwards.

13 years agoAdded the functions to combine and remove adjacent Cidrs.
Michael Orlitzky [Sun, 9 May 2010 17:49:56 +0000 (13:49 -0400)]
Added the functions to combine and remove adjacent Cidrs.
Updated combine_all to perform both types (contained, adjacent) of combination.

13 years agoAdded the decrement function for Maskbits.
Michael Orlitzky [Sun, 9 May 2010 17:40:46 +0000 (13:40 -0400)]
Added the decrement function for Maskbits.

13 years agoAdded the adjacent function to Cidr.
Michael Orlitzky [Sun, 9 May 2010 17:03:54 +0000 (13:03 -0400)]
Added the adjacent function to Cidr.

13 years agoAdded the most_sig_bit_different function to IPv4Address.
Michael Orlitzky [Sun, 9 May 2010 17:01:32 +0000 (13:01 -0400)]
Added the most_sig_bit_different function to IPv4Address.

13 years agoDefine a show instance for Maskbits.
Michael Orlitzky [Sat, 8 May 2010 17:04:06 +0000 (13:04 -0400)]
Define a show instance for Maskbits.

13 years agoDefine a show instance for Cidr.
Michael Orlitzky [Sat, 8 May 2010 16:58:51 +0000 (12:58 -0400)]
Define a show instance for Cidr.

13 years agoDefined a show instance for IPv4Address.
Michael Orlitzky [Sat, 8 May 2010 16:57:14 +0000 (12:57 -0400)]
Defined a show instance for IPv4Address.

13 years agoDefined a show instance for Octet.
Michael Orlitzky [Sat, 8 May 2010 16:50:49 +0000 (12:50 -0400)]
Defined a show instance for Octet.

13 years agoDefine a show instance for Bit.
Michael Orlitzky [Sat, 8 May 2010 16:48:29 +0000 (12:48 -0400)]
Define a show instance for Bit.

13 years agoUpdated the Reduce action to call combine_all on the Cidr list.
Michael Orlitzky [Sat, 8 May 2010 16:46:45 +0000 (12:46 -0400)]
Updated the Reduce action to call combine_all on the Cidr list.

13 years agoImplemented the combine_all function for Cidrs containing one another.
Michael Orlitzky [Sat, 8 May 2010 16:45:46 +0000 (12:45 -0400)]
Implemented the combine_all function for Cidrs containing one another.
Removed the 'contains' export from the Cidr module.
Added a 'contains_proper' convenience function.

13 years agoFixed the Octet to/from Int functions.
Michael Orlitzky [Sat, 8 May 2010 15:51:01 +0000 (11:51 -0400)]
Fixed the Octet to/from Int functions.

13 years agoUpdated the IPv4Address module to use the new Maskbits values.
Michael Orlitzky [Sat, 8 May 2010 15:30:03 +0000 (11:30 -0400)]
Updated the IPv4Address module to use the new Maskbits values.

13 years agoUpdated the Maskable functions to use the new Maskbits values.
Michael Orlitzky [Sat, 8 May 2010 15:29:24 +0000 (11:29 -0400)]
Updated the Maskable functions to use the new Maskbits values.

13 years agoEnumerated all possible values (Zero through ThirtyTwo) for Maskbits.
Michael Orlitzky [Sat, 8 May 2010 15:26:18 +0000 (11:26 -0400)]
Enumerated all possible values (Zero through ThirtyTwo) for Maskbits.
Updated the Cidr module to use the new Maskbits values.

13 years agoAdded a new Maskable typeclass with instances Octet and IPv4Address.
Michael Orlitzky [Thu, 6 May 2010 01:42:47 +0000 (21:42 -0400)]
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.

13 years agoDon't validate the CIDR strings; rather, check whether the type of the returned Cidrs...
Michael Orlitzky [Sun, 2 May 2010 21:08:23 +0000 (17:08 -0400)]
Don't validate the CIDR strings; rather, check whether the type of the returned Cidrs is Cidr.None.

13 years agoRemoved the Text.Regex.Posix import.
Michael Orlitzky [Sun, 2 May 2010 21:06:31 +0000 (17:06 -0400)]
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.

13 years agoReplace the Maskbits type alias with the real thing.
Michael Orlitzky [Sun, 2 May 2010 21:05:46 +0000 (17:05 -0400)]
Replace the Maskbits type alias with the real thing.

13 years agoAdded the octet_from_string function.
Michael Orlitzky [Sun, 2 May 2010 21:05:15 +0000 (17:05 -0400)]
Added the octet_from_string function.

13 years agoAdded the Maskbits module and type.
Michael Orlitzky [Sun, 2 May 2010 21:04:37 +0000 (17:04 -0400)]
Added the Maskbits module and type.

13 years agoAdded a None constructor for Cidr.
Michael Orlitzky [Sun, 2 May 2010 19:23:48 +0000 (15:23 -0400)]
Added a None constructor for Cidr.
Return Cidr.None when we are passed an invalid IPv4Address.

13 years agoAdd a None constructor for IPv4Address.
Michael Orlitzky [Sun, 2 May 2010 19:22:28 +0000 (15:22 -0400)]
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.

13 years agoAdd a None constructor for Octets.
Michael Orlitzky [Sun, 2 May 2010 19:19:00 +0000 (15:19 -0400)]
Add a None constructor for Octets.
Return Octet.None when an octet is created from an invalid Int.

13 years agoAdd a None constructor for Bits.
Michael Orlitzky [Sun, 2 May 2010 19:18:25 +0000 (15:18 -0400)]
Add a None constructor for Bits.

13 years agoRemove the ipv4address_from_string function.
Michael Orlitzky [Sun, 2 May 2010 19:05:55 +0000 (15:05 -0400)]
Remove the ipv4address_from_string function.

13 years agoUpdate Main and Cidr to use the new modules instead of converting to/from bit strings.
Michael Orlitzky [Sun, 2 May 2010 18:39:08 +0000 (14:39 -0400)]
Update Main and Cidr to use the new modules instead of converting to/from bit strings.

13 years agoMove the is_valid_cidr function in to the Cidr module.
Michael Orlitzky [Sun, 2 May 2010 18:01:12 +0000 (14:01 -0400)]
Move the is_valid_cidr function in to the Cidr module.

13 years agoAdded three new modules which are currently independent of the rest of the code:...
Michael Orlitzky [Sun, 2 May 2010 17:53:40 +0000 (13:53 -0400)]
Added three new modules which are currently independent of the rest of the code: Bit, Octet, and IPv4Address.

13 years agoAllow "regexed" and "reduced" for the mode.
Michael Orlitzky [Sat, 1 May 2010 07:53:19 +0000 (03:53 -0400)]
Allow "regexed" and "reduced" for the mode.
Add valid modes to the usage string.

13 years agoAdd mode parsing to the CommandLine module.
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).

13 years agoAdd a CommandLine module for parsing command-line options.
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).

14 years agoMoved most of the CIDR code out of Main and in to a new Cidr module.
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.

14 years agoUnqualify the Numeric import, and specify the functions that we need.
Michael Orlitzky [Fri, 2 Apr 2010 04:46:33 +0000 (00:46 -0400)]
Unqualify the Numeric import, and specify the functions that we need.

14 years agoUnqualify the Data.List import, and specify the functions that we need.
Michael Orlitzky [Fri, 2 Apr 2010 04:45:13 +0000 (00:45 -0400)]
Unqualify the Data.List import, and specify the functions that we need.

14 years agoUnqualify the Data.Char import, and specify the functions that we need.
Michael Orlitzky [Fri, 2 Apr 2010 04:43:27 +0000 (00:43 -0400)]
Unqualify the Data.Char import, and specify the functions that we need.

14 years agoRename hath.hs to Main.hs.
Michael Orlitzky [Fri, 2 Apr 2010 04:40:39 +0000 (00:40 -0400)]
Rename hath.hs to Main.hs.

14 years agoSeparate a few functions out in to a ListUtils module.
Michael Orlitzky [Fri, 2 Apr 2010 04:37:10 +0000 (00:37 -0400)]
Separate a few functions out in to a ListUtils module.

14 years agoTake a newline-separated list of CIDRs as input, and output a regex that will match...
Michael Orlitzky [Thu, 1 Apr 2010 05:29:26 +0000 (01:29 -0400)]
Take a newline-separated list of CIDRs as input, and output a regex that will match any of them.

14 years agoCommented each function.
Michael Orlitzky [Thu, 1 Apr 2010 00:39:32 +0000 (20:39 -0400)]
Commented each function.
Added address barriers on the result of cidr_to_regex.

14 years agoAdded the bin directory and its .gitignore file.
Michael Orlitzky [Wed, 31 Mar 2010 06:02:50 +0000 (02:02 -0400)]
Added the bin directory and its .gitignore file.

14 years agoInitial commit; the first thing that would compile and produce sane output.
Michael Orlitzky [Wed, 31 Mar 2010 06:01:31 +0000 (02:01 -0400)]
Initial commit; the first thing that would compile and produce sane output.