[Haskell-cafe] Solved but strange error in type inference

Yucheng Zhang yczhang89 at gmail.com
Wed Jan 4 14:46:53 CET 2012

On Wed, Jan 4, 2012 at 9:41 PM, Yves Parès <limestrael at gmail.com> wrote:
> Would you try:
> f :: a -> a
> f x = undefined :: a
> And tell me if it works? IMO it doesn't.

It works.

As I understand, in this situation we are specializing the 'undefined
:: forall a. a'
to a more specific dependent type.

More information about the Haskell-Cafe mailing list