representable-tries 0.3.6 → 0.3.7
raw patch · 3 files changed
+10/−4 lines, 3 filesdep ~keysdep ~representable-functors
Dependency ranges changed: keys, representable-functors
Files
- Control/Monad/Reader/Trie.hs +3/−0
- Data/Functor/Representable/Trie.hs +4/−1
- representable-tries.cabal +3/−3
Control/Monad/Reader/Trie.hs view
@@ -71,6 +71,9 @@ instance (HasTrie a, Indexable m) => Indexable (ReaderTrieT a m) where index = uncurry . fmap index . untrie . runReaderTrieT +instance (HasTrie a, Adjustable m) => Adjustable (ReaderTrieT a m) where+ adjust f (a,k) = ReaderTrieT . adjust (adjust f k) a . runReaderTrieT + instance (HasTrie a, Lookup ((:->:) a), Lookup m) => Lookup (ReaderTrieT a m) where lookup (k,k') (ReaderTrieT fm) = lookup k fm >>= lookup k'
Data/Functor/Representable/Trie.hs view
@@ -55,7 +55,7 @@ import Data.Traversable import Prelude hiding (lookup, foldr) -class (TraversableWithKey1 (BaseTrie a), Representable (BaseTrie a)) => HasTrie a where+class (Adjustable (BaseTrie a), TraversableWithKey1 (BaseTrie a), Representable (BaseTrie a)) => HasTrie a where type BaseTrie a :: * -> * -- projectKey . embedKey = id embedKey :: a -> Key (BaseTrie a)@@ -144,6 +144,9 @@ instance HasTrie e => Representable ((:->:) e) where tabulate f = Trie $ tabulate (f . projectKey)++instance HasTrie e => Adjustable ((:->:) e) where+ adjust f k (Trie as) = Trie (adjust f (embedKey k) as) instance HasTrie e => Adjunction (Entry e) ((:->:) e) where unit = mapWithKey Entry . pure
representable-tries.cabal view
@@ -1,6 +1,6 @@ name: representable-tries category: Data Structures, Functors, Monads, Comonads-version: 0.3.6+version: 0.3.7 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -26,9 +26,9 @@ comonad-transformers >= 1.6.3 && < 1.7.0, containers >= 0.3 && < 0.5, distributive >= 0.2 && < 0.3,- keys >= 0.2.6 && < 0.3,+ keys >= 0.2.7 && < 0.3, mtl >= 2.0.1.0 && < 2.1,- representable-functors >= 0.4.2 && < 0.5,+ representable-functors >= 0.4.4 && < 0.5, semigroups >= 0.5 && < 0.6, semigroupoids >= 1.2.2 && < 1.3.0, streams >= 0.7.1 && < 0.8,