packages feed

mono-traversable 0.8.0 → 0.8.0.1

raw patch · 3 files changed

+12/−8 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.8.0.1++README updates+ ## 0.8.0  A new MonoFoldableEq class that takes `elem` and `notElem` from `EqSequence`.
README.md view
@@ -61,7 +61,7 @@  ``` haskell fmap :: Functor f => (a -> b) -> f a -> f b-omap :: MonFunctor mono => (Element mono -> Element mono) -> mono -> mono+omap :: MonoFunctor mono => (Element mono -> Element mono) -> mono -> mono ```  So there is no type-change from `a` to `b`, the contained type must stay the same (`Element mono -> Element mono`).@@ -91,7 +91,7 @@  Same as Foldable, but also operates over monomorphic containers. -MonoFoldable is the heart of the power of mono-traversable (and arguable the package should be named mono-foldable) because anything that can be done with `Foldable` can be done with `MonoFoldable`.+MonoFoldable is the heart of the power of mono-traversable (and arguably the package should be named mono-foldable) because anything that can be done with `Foldable` can be done with `MonoFoldable`. The reason why is that a monomorphic container can never change its type. So `omap` is a restricted `fmap`. However, folding generates a *new* structure, so we have no such concerns.@@ -193,14 +193,14 @@     ... ``` -Textual functions are always safe to use with Unicode (it is possible to mis-use other functions that operate on-individual characters).+Textual functions are always safe to use with Unicode (it is possible to misuse other functions that operate on individual characters).   ### MinLen  Did you notice minimumEx and maximumEx from above? Ex stands for 'Exception'. An exception will occur if you call minimumEx on an empty list.-MinLen is a tool to guarantee that this never occurs, and instead to prove that there is one or more elements in your list.+MinLen is a tool to guarantee that this never occurs, and instead to prove that there are one or more elements in your list.  ``` haskell minimumEx :: MonoFoldable mono => mono -> Element mono@@ -249,7 +249,7 @@  If you have a _polymorphic_ data type which is a member of one of the relevant typeclasses ([Functor](http://hackage.haskell.org/package/base/docs/Data-Functor.html), [Foldable](http://hackage.haskell.org/package/base/docs/Data-Foldable.html),-[Traversable](http://hackage.haskell.org/package/base/docs/Data-Traversable.html)), its quite easy to add an instance for+[Traversable](http://hackage.haskell.org/package/base/docs/Data-Traversable.html)), it's quite easy to add an instance for [MonoFunctor](https://hackage.haskell.org/package/mono-traversable/docs/Data-MonoTraversable.html#t:MonoFunctor), [MonoFoldable](https://hackage.haskell.org/package/mono-traversable/docs/Data-MonoTraversable.html#t:MonoFoldable) or [MonoTraversable](https://hackage.haskell.org/package/mono-traversable/docs/Data-MonoTraversable.html#t:MonoTraversable).  You just have to declare the proper type instance:@@ -270,13 +270,13 @@      Now you are ready to use ```CustomType a``` with the functions defined in this package. -**Note**: if your type is as _monomorphic_ container without the proper typeclasses, then you will have to provide an implementation rather than using the default. However, this should be fairly simple, as it can be seen [in the code](https://hackage.haskell.org/package/mono-traversable/docs/src/Data-MonoTraversable.html#line-234)+**Note**: if your type is a _monomorphic_ container without the proper typeclasses, then you will have to provide an implementation rather than using the default. However, this should be fairly simple, as can be seen [in the code](https://github.com/snoyberg/mono-traversable/blob/d85e4ed3c11afec2d49c0f4fe2812122a279e5d4/src/Data/MonoTraversable.hs#L428)   mono-traversable versus lens Traversal -------------------------------------- -lens is a library with a lot of functionality covering a variety pf patterns. One piece of functionality it exposes is `Fold` and `Traversal` which can also be used to deal with monomorphic containers.+lens is a library with a lot of functionality covering a variety of patterns. One piece of functionality it exposes is `Fold` and `Traversal` which can also be used to deal with monomorphic containers.  You could prefer mono-traversable to using this part of lens because 
mono-traversable.cabal view
@@ -1,5 +1,5 @@ name:                mono-traversable-version:             0.8.0+version:             0.8.0.1 synopsis:            Type classes for mapping, folding, and traversing monomorphic containers description:         Monomorphic variants of the Functor, Foldable, and Traversable typeclasses. If you understand Haskell's basic typeclasses, you understand mono-traversable. In addition to what you are used to, it adds on an IsSequence typeclass and has code for marking data structures as non-empty. homepage:            https://github.com/snoyberg/mono-traversable