Too many package dependencies
andreasabel opened this issue · comments
Hi, I was looking for a strict Maybe type and came across your package.
I was surprised to see the list of dependencies, amongst others, aeson, lens, and bifunctor. If I just wanted a strict version of some data types from base, should not a dependency on base be sufficient?
I'd appreciate a lightweight (non-dependency heavy) version of strict-base-types which just duplicates the functionality of these types found in base!
Mmh, I think found a package for my needs, package strict. Maybe it was your intention to spice this one up...
Hi @andreasabel, yes this package has batteries included on purpose. From the perspective of industrial Haskell code, the included dependencies are not as heavy as you may see them, as they are often direct dependencies.
Note also that you might want to use locally defined datatypes with the exact strictness properties that you need, if you are implementing custom datastructures / libraries. Here's an example in the attoparsec
codebase: https://github.com/bos/attoparsec/blob/master/Data/Attoparsec/Zepto.hs#L46.
Thanks for the pointer. I am using the strict Maybe type for strict tries.
-- | Finite map from @[k]@ to @v@.
--
-- With the strict 'Maybe' type, 'Trie' is also strict in 'v'.
data Trie k v = Trie !(Maybe v) !(Map k (Trie k v))
I hope the package strict is not about to be abandoned. ;-)
I copied parts of your Maybe.Strict module into the Agda code base (Agda.Utils.Maybe.Strict), retaining the copyright notice. I hope that is fine with you. If not, let me know, to find a solution.
Ah sure @ copying. Code is there to be used. Whether it is by reference or by value, I don't care :-)
The strict
package looks pretty much abandoned. However, I don't see any problem of taking over maintenance (according to http://www.haskell.org/haskellwiki/Taking_over_a_package) in case the need comes up.
Great, thanks!