News for hackers. Stuff that matters.
Re:Things that Idris improves things over Haskell by 59nadir on Saturday June 17, 2017 @03:11AM (#14574691)
I'm not sure I follow, sorry. The line says that we also pledge to produce a Semiring from this Foldable structure. Given it's a length function it's about as general a specification I think you can give it without becoming something completely different.
Re:Things that Idris improves things over Haskell by mcguire on Saturday June 17, 2017 @11:51PM (#14578872)
To the first question, a Semiring has two operations, + and × conventionally (along with ...). That seems to be more than length needs. A Monoid is just an operation and its identity, which should be exactly what you need for length.

For the second question, traditional (+,×,...) is a Semiring for integers; so is (&,|,...) (bitwise boolean operations). How can you define both Semiring implementations without getting them confused?

There is another reply to my comment that I haven't digested yet. Maybe it answers the second.

Re:Things that Idris improves things over Haskell by mcguire on Sunday June 18, 2017 @02:00PM (#14581932)
"A Monoid is just an operation and its identity, which should be exactly what you need for length."

And I'm wrong about that. You need a zero and a one, right. What would that structure be?