|
|
|
|
|
by reikonomusha
806 days ago
|
|
What about when writing a function with polymorphic recursion, rank-N types, or the monomorphism restriction? There are plenty of examples where a type declaration is required to get functionality, especially when we consider what GHC offers as being "Haskell". I agree the author could be more clear about this—that Haskell and GHC only sometimes require type annotations in certain circumstances. |
|
And even in some cases where you used to need them a simple type application is often enough now.
You can go an entire career without writing a single type annotation. It depends heavily on what style of Haskell you write.