on develop help sign in
add a sentence describing what Patch is to the readme
commit54ab317124745c07e8796e165090fdce41bb1b6c authorJacquin Mininger <jacquin.mininger@gmail.com> dateThu 9 Jan 2020, 18:34 (7 years ago) parentd77b245
1 file changed+10
README.md+10
README.md+10
@@ -1,3 +1,13 @@
11## Patch
22
33Infrastructure for writing patches which act on other types.
4+
5+A `Patch` type represents a kind of change made to a datastructure.
6+
7+```haskell
8+class Patch p where
9+ type PatchTarget p :: *
10+ -- | Apply the patch p a to the value a. If no change is needed, return
11+ -- 'Nothing'.
12+ apply :: p -> PatchTarget p -> Maybe (PatchTarget p)
13+```