on jam@fix-docs help sign in
patch/README.md
13 lines 348 B history raw
1## Patch
3Infrastructure for writing patches which act on other types.
5A `Patch` type represents a kind of change made to a datastructure.
7```haskell
8class 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```