News for hackers. Stuff that matters.
Re:The Rust Platform by wyager on Thursday July 28, 2016 @04:30AM (#12179051)
Sounds like the problem there is that the Haskell typechecker assumes injectivity, not that it supports case-analysis.
Re:The Rust Platform by catnaroek on Thursday July 28, 2016 @04:34AM (#12179067)
The injectivity assumption isn't unjustified - type constructors are injective.
Re:The Rust Platform by wyager on Thursday July 28, 2016 @02:16PM (#12182012)
> The injectivity assumption isn't unjustified

Strongly disagree.

(+2) 3 == (+1) 4 implies neither (+2) == (+1) nor 3 == 4. So Fst goes out the window.

(even 5) == (even 7) does not imply 5 == 7.

>type constructors are injective.

But type functions aren't, and that's what we want.

I agree that it's misleading to have type functions look like type constructors syntactically.

Re:The Rust Platform by catnaroek on Thursday July 28, 2016 @04:10PM (#12182792)
The type constructor that's being assumed injective in the section “Deriving `absurd` with type families” is `R`.