ekmett / monoids

Monoids, specialized containers and a general map/reduce framework
http://hackage.haskell.org/package/monoids
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

No Reducer instances for containers #2

Closed richsmith92 closed 7 years ago

richsmith92 commented 12 years ago

In fresh ghci session:

ghci> :m Data.Set Data.Monoid.Reducer
ghci> unit () :: Set ()

<interactive>:1:1:
    No instance for (Reducer () (Set ()))
      arising from a use of `unit'
    Possible fix: add an instance declaration for (Reducer () (Set ()))
    In the expression: unit () :: Set ()
    In an equation for `it': it = unit () :: Set ()
ghci> unit () :: [()] -- for comparison
[()]

Same for Map and probably other containers. I think you should remove these "#ifdef M_CONTAINERS" lines. I searched in google for "M_CONTAINERS", and this seems to be only in monoids package.

richsmith92 commented 12 years ago

Sorry for close/reopen. It wasn't a good idea to try github hotkeys by pressing random keys :)

ekmett commented 12 years ago

Sounds right. Have you tried the later reducers package?

I need to deprecate monoids.

Sent from my iPhone

On Nov 22, 2011, at 5:17 PM, Alexey Karakulovreply@reply.github.com wrote:

In fresh ghci session:

ghci> :m Data.Set Data.Monoid.Reducer ghci> unit () :: Set ()

:1:1: No instance for (Reducer () (Set ())) arising from a use of `unit' Possible fix: add an instance declaration for (Reducer () (Set ())) In the expression: unit () :: Set () In an equation for`it': it = unit () :: Set () ghci> unit () :: [()] -- for comparison [()] Same for Map and probably other containers. I think you should remove these "#ifdef M_CONTAINERS" lines. I searched in google for "M_CONTAINERS", and this seems to be only in monoids package. --- Reply to this email directly or view it on GitHub: https://github.com/ekmett/monoids/issues/2
richsmith92 commented 12 years ago

On Wed, Nov 23, 2011 at 3:14 AM, Edward A. Kmett < reply@reply.github.com

wrote:

Sounds right. Have you tried the later reducers package?

Thanks, that helps.

I need to deprecate monoids.

Sent from my iPhone

On Nov 22, 2011, at 5:17 PM, Alexey Karakulovreply@reply.github.com wrote:

In fresh ghci session:

ghci> :m Data.Set Data.Monoid.Reducer ghci> unit () :: Set ()

:1:1: No instance for (Reducer () (Set ())) arising from a use of `unit' Possible fix: add an instance declaration for (Reducer () (Set ())) In the expression: unit () :: Set () In an equation for`it': it = unit () :: Set () ghci> unit () :: [()] -- for comparison [()] Same for Map and probably other containers. I think you should remove these "#ifdef M_CONTAINERS" lines. I searched in google for "M_CONTAINERS", and this seems to be only in monoids package. --- Reply to this email directly or view it on GitHub: https://github.com/ekmett/monoids/issues/2

Reply to this email directly or view it on GitHub: https://github.com/ekmett/monoids/issues/2#issuecomment-2843636

richsmith92 commented 12 years ago

So, do as you wish with the issue, this doesn't matter much since you want to deprecate the package.