Hacker News new | past | comments | ask | show | jobs | submit login

I personally find it incredibly clean. You separate the type signature from the implementation (mostly because a lot of the times it is unnecessary from the compiler's pov, but useful as documentation). To that end, I don't see it as any different from a javadoc or any kind of code documentation.

In addition since Haskell supports multiple case defitions at the top level inline type declarations would be redundant. For example -

current a 0 :: IO Int Int -> Int current 0 b :: IO Int Int -> Int current 0 0 :: IO Int Int -> Int

vs.

current :: IO Int Int -> Int current 0 a = ... current a 0 = ... current 0 0 = ...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: