haskell / statistics

A fast, high quality library for computing with statistics in Haskell.
http://hackage.haskell.org/package/statistics
BSD 2-Clause "Simplified" License
300 stars 68 forks source link

Please add type signatures in Statistics.Sample.Histogram #202

Closed simonpj closed 1 year ago

simonpj commented 1 year ago

@Shimuuar could I invite you to look at https://gitlab.haskell.org/ghc/ghc/-/issues/23224

It's a GHC issue that shows that Statistics.Sample.Histogram is very delicately balanced indeed, on the way GHC infers types for nested bindings, with local equality constraints and type families.

It is easy to make it robust: just add type signatures as described in the above ticket. Moreover, it makes the code a lot easier to understand.

Could you possibly do that? Thanks!

Shimuuar commented 1 year ago

@simonpj I've uploaded 0.16.2.0 with fix to hackage. Hopefully it will work

simonpj commented 1 year ago

Thank you!