Hacker News new | ask | show | jobs
by ernst_klim 2887 days ago
>Mere arithmetic and some kind of ability to loop gives you that kind of turing completeness

I need my typechecker be total. And you don't need turing completeness for arithmetic and recursion.

1 comments

> I need my typechecker be total.

Recursion limits make it total, very easily.

> And you don't need turing completeness for arithmetic and recursion.

Yes you do. If you allow basic arithmetic to recurse n times, it can simulate n iterations of a turing machine.

You don't need infinite loops, all you need are simple inductive types and reduction rules, it has not to be a turing complete language. You can have simple typelevel functions in haskell, whilst its typechecker is not turing-complete.