osa1 github gitlab twitter cv rss

TIL - Haskell 98 doesn't have principal typing property

September 20, 2013 - Tagged as: en, haskell.

After hearing the term “polymorphic recursion” at FSL meeting today, I just searched for it in Wikipedia(I never heard that term before). It’s explained with a Haskell code, with a note saying that:

In Haskell, unlike for most other functions definitions, the type signature cannot be omitted.

.. and that code is Haskell 98 compliant. For a long time I thought Haskell 98 has principal typing property – but apparently I was wrong. I wrote that in Haskell IRC channel and there were other people who were thinking same.

People at IRC channel also said that SML bans polymorphic recursion and have principal typing. Nice to know.