Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fumieval/incremental
Type class for patch and diff
https://github.com/fumieval/incremental
diff haskell
Last synced: 23 days ago
JSON representation
Type class for patch and diff
- Host: GitHub
- URL: https://github.com/fumieval/incremental
- Owner: fumieval
- License: bsd-3-clause
- Created: 2017-08-02T04:52:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-19T05:36:49.000Z (about 4 years ago)
- Last Synced: 2024-09-30T23:47:39.350Z (about 1 month ago)
- Topics: diff, haskell
- Language: Haskell
- Homepage:
- Size: 21.5 KB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# incremental: incremental update interface
[![Hackage](https://img.shields.io/hackage/v/incremental.svg)](https://hackage.haskell.org/package/incremental)
![Haskell CI](https://github.com/fumieval/incremental/workflows/Haskell%20CI/badge.svg)
[![Discord](https://img.shields.io/discord/664807830116892674?color=%237095ec&label=Discord&style=plastic)](https://discord.gg/DG93Tgs)This package provides a typeclass for incremental updates and diffing.
```haskell
class Incremental a where
-- | the difference type
type Delta a
-- | @'maybe' a ('patch' a) ('diff' b a) ≡ b@
patch :: a -> Delta a -> a
-- | returns 'Nothing' when there is no update
diff :: a -> a -> Maybe (Delta a)
```