Skip to content

Commit 54ab317

Browse files
committed
add a sentence describing what Patch is to the readme
1 parent d77b245 commit 54ab317

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
## Patch
22

33
Infrastructure 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+
```

0 commit comments

Comments
 (0)