bjornbm / dimensional

Dimensional library variant built on Data Kinds, Closed Type Families, TypeNats (GHC 7.8+).
BSD 3-Clause "New" or "Revised" License
102 stars 16 forks source link

Product #178

Closed dmcclean closed 8 years ago

dmcclean commented 8 years ago

We currently have sum :: (Num a, Foldable f) => f (Quantity d a) -> Quantity d a, but we reexport product from the prelude at product :: (Num a, Foldable t) => t a -> a.

Should we have product :: (Num a, Foldable f) => f (Dimensionless a) -> Dimensionless a? It seems we should for consistency, but it is a breaking change.

bjornbm commented 8 years ago

I needed and wrote this myself just recently. Perhaps we should add it.

On 2016-09-22, at 02:38, Douglas McClean notifications@github.com wrote:

We currently have sum :: (Num a, Foldable f) => f (Quantity d a) -> Quantity d a, but we reexport product from the prelude at product :: (Num a, Foldable t) => t a -> a.

Should we have product :: (Num a, Foldable f) => f (Dimensionless a) -> Dimensionless a? It seems we should for consistency, but it is a breaking change.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bjornbm/dimensional/issues/178, or mute the thread https://github.com/notifications/unsubscribe-auth/AACRlCmMoCGqCkicaGHk2Da9e51lhbtBks5qscACgaJpZM4KDY76.