on ecb838f help sign in
MemoTrie.cabal+6−5
since splitsnapshots
unifiedsplit
@@ -1,5 +1,5 @@
1Name: MemoTrie
1Name: MemoTrie
2−Version: 0.6.10
2+Version: 0.6.7
3Cabal-Version: >= 1.10
3Cabal-Version: >= 1.10
4Synopsis: Trie-based memo functions
4Synopsis: Trie-based memo functions
5Category: Data
5Category: Data
@@ -10,11 +10,11 @@ Description:
10 .
10 .
11 Project wiki page: <http://haskell.org/haskellwiki/MemoTrie>
11 Project wiki page: <http://haskell.org/haskellwiki/MemoTrie>
12 .
12 .
13− &#199; 2008-2019 by Conal Elliott; BSD3 license.
13+ &#169; 2008-2016 by Conal Elliott; BSD3 license.
14Homepage: https://github.com/conal/MemoTrie
14Homepage: https://github.com/conal/MemoTrie
15Author: Conal Elliott
15Author: Conal Elliott
16Maintainer: conal@conal.net
16Maintainer: conal@conal.net
17−Copyright: (c) 2008-2019 by Conal Elliott
17+Copyright: (c) 2008-2016 by Conal Elliott
18License: BSD3
18License: BSD3
19License-File: COPYING
19License-File: COPYING
20Stability: experimental
20Stability: experimental
@@ -33,9 +33,9 @@ Library
33 hs-Source-Dirs: src
33 hs-Source-Dirs: src
34
34
35 if impl(ghc >= 7.10.0)
35 if impl(ghc >= 7.10.0)
36− Build-Depends: base >=4.8.0.0 && <5, newtype-generics >= 0.5.3
36+ Build-Depends: base >=4.8.0.0 && <5, newtype-generics >= 0.4
37 else
37 else
38− Build-Depends: base <4.8.0.0, void, newtype-generics >= 0.5.3
38+ Build-Depends: base <4.8.0.0, void, newtype-generics >= 0.4
39
39
40 Exposed-Modules:
40 Exposed-Modules:
41 Data.MemoTrie
41 Data.MemoTrie
@@ -48,6 +48,7 @@ executable generic
48 buildable: False
48 buildable: False
49 main-is: Generic.hs
49 main-is: Generic.hs
50 ghc-options: -Wall
50 ghc-options: -Wall
51+ default-language: Haskell2010
51 hs-source-dirs: examples
52 hs-source-dirs: examples
52 default-language: Haskell2010
53 default-language: Haskell2010
53 build-depends: base, MemoTrie
54 build-depends: base, MemoTrie
src/Data/MemoTrie.hs+1−16
@@ -76,7 +76,7 @@ import Data.Monoid
76import Data.Function (on)
76import Data.Function (on)
77import GHC.Generics
77import GHC.Generics
78
78
79−import Control.Newtype.Generics
79+import Control.Newtype
80
80
81import Data.Void (Void)
81import Data.Void (Void)
82
82
@@ -315,16 +315,6 @@ if' _ e True = e
315 BoolTrie f t
315 BoolTrie f t
316-}
316-}
317
317
318−instance HasTrie a => HasTrie (Maybe a) where
319− data (:->:) (Maybe a) b = MaybeTrie b (a :->: b)
320− trie f = MaybeTrie (f Nothing) (trie (f . Just))
321− untrie (MaybeTrie nothing_val a_trie) = maybe nothing_val (untrie a_trie)
322− enumerate (MaybeTrie nothing_val a_trie) = (Nothing, nothing_val) : enum' Just a_trie
323−
324−instance Newtype (Maybe a :->: x) where
325− type O (Maybe a :->: x) = (x, a :->: x)
326− pack (a,f) = MaybeTrie a f
327− unpack (MaybeTrie a f) = (a,f)
328
318
329instance (HasTrie a, HasTrie b) => HasTrie (Either a b) where
319instance (HasTrie a, HasTrie b) => HasTrie (Either a b) where
330 data (Either a b) :->: x = EitherTrie (a :->: x) (b :->: x)
320 data (Either a b) :->: x = EitherTrie (a :->: x) (b :->: x)
@@ -587,12 +577,7 @@ instance HasTrie a => Monad ((:->:) a) where
587
577
588instance (HasTrie a, Monoid b) => Monoid (a :->: b) where
578instance (HasTrie a, Monoid b) => Monoid (a :->: b) where
589 mempty = trie mempty
579 mempty = trie mempty
590−#if !MIN_VERSION_base(4,11,0)
591 mappend = inTrie2 mappend
580 mappend = inTrie2 mappend
592−#else
593−instance (HasTrie a, Semigroup b) => Semigroup (a :->: b) where
594− (<>) = inTrie2 (<>)
595−#endif
596
581
597instance HasTrie a => Functor ((:->:) a) where
582instance HasTrie a => Functor ((:->:) a) where
598 fmap f = inTrie (fmap f)
583 fmap f = inTrie (fmap f)
stack.yaml+5−7
@@ -1,7 +1,5 @@
1−# resolver: lts-9.21 # ghc-8.0.2
1+flags: {}
2−# resolver: lts-11.22 # ghc-8.2.2
2+extra-deps:
3−# resolver: lts-12.14 # ghc-8.4.3
3+- MemoTrie-0.6.5
4−# resolver: lts-12.19 # ghc-8.4.4
4+- newtype-generics-0.4
5−# resolver: lts-13.0 # ghc-8.6.3
5+resolver: nightly-2016-07-18
6−# resolver: lts-13.13 # ghc-8.6.4
7−resolver: lts-14.6 # ghc-8.6.5