loops,logic,proof,turing-machines,halting-problem

You need to prove that H does not exist. You have shown that H applied to itself cannot print "does not halt". But, as you rightfully point out, the possibility that it prints "does halt" is not excluded. There's no apparent contradiction in this. So this application of H to...

Is Control.Exception.try really breaking things here? unsafePerformIO is breaking things here. In GHC, undefined simply raises an exception rather than looping forever (which would be unhelpful). Exceptions are not meant to be caught in pure (non-IO) code -- indeed the type system indeed prevents you to attempt as much....

There is a tricky way to get StackOverflow on scalac using recursion in combination with polymorphism: scala> trait Re { type X[R <: Re] } warning: there were 1 feature warning(s); re-run with -feature for details defined trait Re scala> trait ReRe extends Re {type X[R <: Re] = R#X[R]}...

recursion,logic,computation-theory,halting-problem

That proof does not require recursion. You are missing the point! You don't call paradox, but pass it like a higher order function. Take this function in Scheme and it's usage: ;; does operation passed as x to 2 and 5 (define (do2by5 x) (x 2 5)) ;; examples (do2by5...