News for hackers. Stuff that matters.
Re:Reusable Software? Just Don't Write Generic Code by tome on Wednesday January 07, 2015 @10:42AM (#8851091)
Could you explain a bit more? A quick search suggests that semi-unification is equivalent to Milner-Mycroft typeability, which is polymorphic recursion, which Haskell does indeed have.

http://homepages.dcc.ufmg.br/~camarao/SUP/

http://en.wikipedia.org/wiki/Polymorphic_recursion

Re:Reusable Software? Just Don't Write Generic Code by seanmcdirmid on Wednesday January 07, 2015 @06:55PM (#8854157)
Right, but not without type inference. One of the reasons Scala's type system is quite complicated is that it can do semi-unification to achieve local type inference, at least (semi-unification is undecidable in general, and Scala makes a best effort, I believe).

How does Haskell deal with refs?

Re:Reusable Software? Just Don't Write Generic Code by tome on Thursday January 08, 2015 @09:40AM (#8856517)
I'm not sure what you mean. I'm not aware of any type inference difficulties with IORefs or STRefs. Polymorphic recursion, on the other hand, does often (or maybe always) require an explicit type signature.
Re:Reusable Software? Just Don't Write Generic Code by seanmcdirmid on Thursday January 08, 2015 @05:06PM (#8859333)
If you were to do type inference across mutable reference assignments, you would have to do some semi unification. I don't think haskell does, even ML treats refs very strangely.