News for hackers. Stuff that matters.
Re:Hindley-Milner Type Inference (2012) by NOGDP on Friday July 10, 2020 @11:29PM (#23799218)
I guess the idea is:

data Foo a b c = FooBar a b | FooBaz c

or

data Foo a b = FooBar a b | FooBaz [a]

But I agree that writing explicit type annotations is overall better practice.

Re:Hindley-Milner Type Inference (2012) by a1369209993 on Friday July 10, 2020 @11:50PM (#23799305)
That declares 'Foo' with kind * -> * -> * -> * , ie a generic type. Whereas I was declaring with kind * , a specific type that might have infered components. Compare:

  quux :: a -> a
  quux x = x
  # quux takes any type genericly
  
  frob y = y () ++ [()]
  # frob takes some specific type, but we don't need to specify which (spoiler alert: it's () -> [()])
Edit: actually the type is generic (not polymorphic) as well.
Re:Hindley-Milner Type Inference (2012) by NOGDP on Sunday July 12, 2020 @12:07AM (#23808718)
Why does the kind matter? Both of your examples use type inference and polymorphism - the type 'a' is inferred when quux is used, the type for the second example is inferred from the polymorphic types of (++) and `$`, and both allow to code more freely while in flux.