@@ -27,6 +27,7 @@ import Data.List
2727import Data.Map (Map)
2828import qualified Data.Map as Map
2929import Data.Maybe
30+--import Data.Proxy
3031#if !MIN_VERSION_base(4,9,0)
3132import Data.Semigroup (Semigroup (..), (<>))
3233#endif
@@ -47,6 +48,13 @@ deriving instance (Ord k, Read k, Read p, Read (PatchTarget p)) => Read (PatchMa
4748deriving instance (Eq k, Eq p, Eq (PatchTarget p)) => Eq (PatchMapWithMove k p)
4849deriving instance (Ord k, Ord p, Ord (PatchTarget p)) => Ord (PatchMapWithMove k p)
4950
51+-- -- | Skips the patch so it's 'Functor' and friends
52+-- newtype PatchMapWithMove' k v = PatchMapWithMove' { unPatchMapWithMove' :: PatchMapWithMove k (Proxy v) }
53+--
54+-- deriving instance Functor (PatchMapWithMove' k)
55+-- deriving instance Foldable (PatchMapWithMove' k)
56+-- deriving instance Traversable (PatchMapWithMove' k)
57+
5058-- | Holds the information about each key: where its new value should come from,
5159-- and where its old value should go to
5260data NodeInfo k p = NodeInfo
@@ -83,6 +91,13 @@ data To k p
8391 )
8492
8593makeWrapped ''PatchMapWithMove
94+--makeWrapped ''PatchMapWithMove'
95+
96+-- instance FunctorWithIndex k (PatchMapWithMove k)
97+-- instance FoldableWithIndex k (PatchMapWithMove k)
98+-- instance TraversableWithIndex k (PatchMapWithMove k) where
99+-- itraverse = itraversed . Indexed
100+-- itraversed = _Wrapped .> itraversed <. traversed
86101
87102-- | Create a 'PatchMapWithMove', validating it
88103patchMapWithMove