Giter VIP home page Giter VIP logo

Comments (3)

AHartNtkn avatar AHartNtkn commented on August 16, 2024 1

I tried simplifying the example a bit. The following gives a similar error;

(ListFMap f Nil) = Nil
(ListFMap f (Cons a x)) = (Cons a (f x))

(ListCata a l) = (a (ListFMap (λl (ListCata a l)) l))

(ListAlg n r Nil) = n
(ListAlg n r (Cons a x)) = (r a x)

(Foldr n r l) = (ListCata (λx (ListAlg n r x)) l)

(Append l1 l2) = (Foldr l2 (λx λy (Cons x y)) l1)

(Concat l) = (Foldr Nil (λl1 λl2 (Append l1 l2)) l)

Main = (Concat (Cons (Cons 1 Nil) Nil))

Replacing Foldr with

(Foldr n r Nil) = n
(Foldr n r (Cons a x)) = (r a (Foldr n r x))

gets rid of the error.

from hvm.

AHartNtkn avatar AHartNtkn commented on August 16, 2024 1

This appears to have been fixed. Both examples now give the expected outputs.

from hvm.

VictorTaelin avatar VictorTaelin commented on August 16, 2024

Thanks for the issue. From an initial inspection, I'd guess it reaches the cloning limitations. I'm working on a user-facing language that will properly check these cases, apply automatic fixes when possible, and report a good error when not. This may take some time though.

Worth noting we're looking for funding and devs to work on these issues! :)

from hvm.

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.