
2 Sep
2009
2 Sep
'09
2:46 p.m.
2009/9/2 Magnus Therning
Is it possible to implement in haskell a function f (A) such that if A does not ever terminate then f always terminates, and if A always terminates then f does not ever terminate?
Thanks in advance :-),
Isn't this the halting problem?
It is, since to ensure that f terminates and evaluates to a given value for every A that do not terminate it must be able to determine that it don't terminate in finite time, thus solving the halting problem. In other words this can't be written in Haskell and a fortiori can't be written on a computer in any language. -- Jedaï