Daniel-Diaz / matrix

A Haskell native implementation of matrices and their operations.
BSD 3-Clause "New" or "Revised" License
35 stars 31 forks source link

Unsafe getElem function #8

Closed abbradar closed 10 years ago

abbradar commented 10 years ago

Hello, I had somewhat hard time debugging a code snippet from a friend that had caused a segfault in Haskell. I've used an old version of your library earlier where getElem was safe and reported out of bounds errors, and found its new behaviour only while looking through library code. Please, state in documentation that (!) and getElem is unsafe now or (I think this is better, because most users will expect that instead of segfaults, and that will clearly show unsafe code) make separate unsafeGetElem and make getElem and (!) throw errors on out of bounds, like earlier. Thanks!

abbradar commented 10 years ago

Sorry, I've misclicked.

abbradar commented 10 years ago

Thanks!

abbradar commented 10 years ago

One more thing: do you plan to release a new version with this soon? I ask because I have a friend to whom I'll need to explain why Haskell, too, has "scary segfaults" and help him fix his code later today. ^_^

Daniel-Diaz commented 10 years ago

I will push a new version to Hackage in a few moments. :)

abbradar commented 10 years ago

Thanks!

Daniel-Diaz commented 10 years ago

New version released: http://hackage.haskell.org/package/matrix-0.3.1.0

My apologies for the misbehavior of these functions.

abbradar commented 10 years ago

No problem, thanks for fast reaction! BTW, does Hackage need some time to build documentation? The links are inactive ATM.

Daniel-Diaz commented 10 years ago

Yes, documentation takes some time to appear. Not much since Hackage 2.