2{-# LANGUAGE TypeOperators #-}
3{-# LANGUAGE TypeFamilies #-}
8-- This module defines the 'Patch' class.
14#if !MIN_VERSION_base(4,11,0)
15import Data.Semigroup (Semigroup (..))
18import Data.Semigroup.Additive as X
19import Data.Patch.Class as X
20import Data.Patch.DMap as X hiding (getDeletions)
21import Data.Patch.DMapWithMove as X
22 ( PatchDMapWithMove, const2PatchDMapWithMoveWith, mapPatchDMapWithMove
23 , patchDMapWithMoveToPatchMapWithMoveWith
24 , traversePatchDMapWithMoveWithKey, unPatchDMapWithMove
25 , unsafePatchDMapWithMove, weakenPatchDMapWithMoveWith
27import Data.Patch.IntMap as X hiding (getDeletions)
28import Data.Patch.Map as X
29import Data.Patch.MapWithMove as X
30 ( PatchMapWithMove, patchMapWithMoveNewElements
31 , patchMapWithMoveNewElementsMap, unPatchMapWithMove
32 , unsafePatchMapWithMove
35-- | The elements of an 'Additive' 'Semigroup' can be considered as patches of their own type.
36newtype AdditivePatch p = AdditivePatch { unAdditivePatch :: p }
38instance Additive p => Patch (AdditivePatch p) where
39 type PatchTarget (AdditivePatch p) = p
40 apply (AdditivePatch p) q = Just $ p <> q
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list