on develop help sign in
add a sentence describing what Patch is to the readme
54ab317Jacquin Mininger
README.md+10
@@ -1,3 +1,13 @@
1## Patch
1## Patch
2
2
3Infrastructure for writing patches which act on other types.
3Infrastructure 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+```