News for hackers. Stuff that matters.
Re:Hindley-Milner Type Inference (2012) by eru on Saturday July 11, 2020 @12:29AM (#23799510)
That's a type definition. You can't get away without writing out that definition.

If you wanted to, you could use

    Either (Int, String) [Int]
in your code and rely on type inference to do all the work.
Re:Hindley-Milner Type Inference (2012) by a1369209993 on Saturday July 11, 2020 @01:11AM (#23799695)
> You can't get away without writing out that definition.

Not in Haskell as far as I know, but (assuming MonomorphismRestriction) there's no technical reason why

  data Qwe = Q a
  qwe_eps :: Qwe
  qwe_eps = Q ""
couldn't infer a ~ String in the type definition for Qwe. It's just annoying and pointless, because you never actually care about having to write a explicit type annotation there. (Which was my point.) But it's still a explicit type annotation that you're required to write. (Which was (kind of) chrisseaton's point.)