Git Product home page Git Product logo

Comments (4)

edwinb avatar edwinb commented on May 16, 2024

Indeed - that's because there is a built in limit on how deeply the REPL will evaluate recursive functions, and you just happen to have hit it…

Edwin.

On 24 Nov 2012, at 17:08, Falko [email protected] wrote:

If I type, e.g. in the REPL, fO {k = 996}, the output contains some strange items:

... (S (boolElim (Builtins.!>#@Builtins.Ord$[Int] 1 0 (boolElim (intToBool (prim__eqInt 1 0)) EQ (boolElim (intToBool (prim__ltInt 1 0)) Builtins.LT Builtins.GT))) (S O) O) ...

Until 995 it is fine :)

Thank you, and kind regards. Zenon

β€”
Reply to this email directly or view it on GitHub.

from idris-dev.

zenon avatar zenon commented on May 16, 2024

So its a feature then?

from idris-dev.

edwinb avatar edwinb commented on May 16, 2024

Not really a feature, though the behaviour is intentional - it is left over from before the totality checker could decide for itself whether something was guaranteed to terminate. It should only behave like this on expressions that aren't known to terminate - so I will fix it now that the totality checker is more reliable.

from idris-dev.

david-christiansen avatar david-christiansen commented on May 16, 2024

As far as I can tell, this issue has been fixed. In latest master:

Idris> fO {k=996}
fO : Fin 997
Idris> fO {k=2000}
fO : Fin 2001

from idris-dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.