-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement precedence-handling bijective read/show
refactors and reimplements Network.Socket.ReadShow to allow for precedence-sensitive Read/Show instances built on an underlying bijective framework. Behavior conforms to derived read/show instances by default but short-circuits to fixed strings when input matches element of a list of paired elements defining a partial bijection. adds several flexible helper-functions to Network.Socket.ReadShow to allow for minimal-boilerplate implementations of bijective read/show for arbitrary types in future. Adds more descriptive documentation for non-obvious properties of Network.Socket.ReadShow types and functions reimplements instance declarations of read/show for types already using bijective read/show definitions Adds cases to Network.SocketSpec test suite to ensure that ReadShow-based Show instances produce expected output for each pattern-bijection type Adds quickcheck-dependent (updated cabal file) tests to ensure roundtrip equality for `read.show` for all types using ReadShow-based instances over arbitrary values, specifically biased towards pattern synonym values
- Loading branch information
1 parent
d4a4bb1
commit 710b6ca
Showing
7 changed files
with
324 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.