[Haskell-cafe] Existential question

Miguel Mitrofanov miguelimo38 at yandex.ru
Thu Aug 18 10:07:25 CEST 2011

> Now, what we can do with kl1? We can feed it an integer, say 1, and
> obtain function f of the type s -> (s,Bool) for an _unknown_ type s.
> Informally, that type is different from any concrete type. We can
> never find the Bool result produced by that function since we can
> never have any concrete value s. The only applications of f that will
> type check are
> 	\s -> f s
> 	f undefined
> both of which are useless to obtain f's result.

That's not true. We can tie the knot:

let (s, o) = f s in o

More information about the Haskell-Cafe mailing list