News for hackers. Stuff that matters.
Re:The Algebra of Algebraic data types by bweitzman on Thursday June 25, 2015 @12:39PM (#9779152)
Actually I just realized that the law does not hold, the type `Void -> Maybe Void` has two inhabitants, not one:

f1 x = Nothing

f2 x = Just x

Re:The Algebra of Algebraic data types by wz1000 on Thursday June 25, 2015 @01:34PM (#9779510)
Both of them are regarded as the same function(ignoring bottom) because there is no way to differentiate between them as you can never supply them with a value of type Void in order to see their result.
Re:The Algebra of Algebraic data types by bweitzman on Thursday June 25, 2015 @04:50PM (#9780823)
They are similar in that they cannot be applied to any non-bottom value, but they are definitely not the same function.
Re:The Algebra of Algebraic data types by sjolsen on Thursday June 25, 2015 @10:53PM (#9782228)
>they are definitely not the same function

This depends on what equivalence you're using, and the only one in which it's true (definitional equality) isn't very interesting. Extensionally, the functions are identical.

Re:The Algebra of Algebraic data types by bweitzman on Friday June 26, 2015 @11:02AM (#9784911)
Ignoring, bottom, the functions arguably have no extensionality, and therefore are only vacuously equivalent in that sense.
Re:The Algebra of Algebraic data types by yummyfajitas on Thursday June 25, 2015 @01:22PM (#9779432)
`Just x` cannot be constructed since there is no `x` which is has type `Void`.
Re:The Algebra of Algebraic data types by tel on Thursday June 25, 2015 @02:09PM (#9779801)
Well, there's the one in context that does! Except this function can never be called in an empty context so you ultimately are stuck.
Re:The Algebra of Algebraic data types by bweitzman on Thursday June 25, 2015 @04:45PM (#9780803)
`Just x` can be constructed given an `x`. The fact that no `x` can be given is somewhat irrelevant to the definition of the function.