News for hackers. Stuff that matters.
Re:Hask is not a category by tome on Sunday August 07, 2016 @07:31AM (#12241779)
> you occasionally stumble upon an abstraction leak, and then you need to take a really deep breath, climb down the abstraction ladder

Can you give an example?

Re:Hask is not a category by catnaroek on Sunday August 07, 2016 @03:04PM (#12243182)
For most type classes and instances, the proofs that the corresponding laws hold break horribly if you substitute their free variables with nonterminating computations. For instance, `0 * x = 0` doesn't hold if `x` is `undefined`.
Re:Hask is not a category by tome on Sunday August 07, 2016 @06:12PM (#12243984)
How would a strict language help? `0 * x = 0` doesn't hold if `x` is substituted by a non-terminating computation `f ()`. What exactly would be the benefit?
Re:Hask is not a category by catnaroek on Sunday August 07, 2016 @07:22PM (#12244331)
In a strict language, non-terminating computations aren't values in the first place. So you can't substitute `x` with bottom.
Re:Hask is not a category by tome on Monday August 08, 2016 @03:21AM (#12245979)
I don't think I've grasped the distinction between substituting a variable of type t with a value of type t versus an expression of type t.
Re:Hask is not a category by catnaroek on Monday August 08, 2016 @04:54AM (#12246328)
There's no such distinction. But, in the operational semantics of a call-by-value language, variables are only substituted with values.

Or, to be consistent with the terminology I've used in other comments, in any language, a value is something a variable can be substituted with. It's just that, in a call-by-value language, variables can never be substituted with unfinished computations.

Re:Hask is not a category by sclv on Sunday August 07, 2016 @05:22PM (#12243720)
You do get 0 * x <= 0. You just need a splash of domain theory to make the medicine go down.
Re:Hask is not a category by tome on Sunday August 07, 2016 @06:12PM (#12243985)
I don't think that's the <= you were looking for ...