Comments (3)
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.
This appears to have been fixed. Both examples now give the expected outputs.
from hvm.
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)
- Using HVM as transformation engine for Proc-Macros?
- List of builtin modules and functions? HOT 1
- New Error ->error[E0599]: no method named `as_mut_ptr` found for struct `AtomicU64` in the current scope HOT 2
- Add more eval API options HOT 4
- Compiling hvm v1.0.3 - error[E0635]: unknown feature `atomic_mut_ptr` HOT 1
- Async IO? HOT 1
- Explanation in more simple terms HOT 8
- fixed-point combinator hangs when using more than one thread HOT 1
- Build error due to atomic API change HOT 1
- Benchmark for parallel prefix sums.
- Haskell Bit Multiplication HOT 1
- use fixed size nodes in `Heap`
- Race condition at non-atomic store in `alloc_body`
- Unnecessary unsafe in `new_atomic_u64_array` HOT 1
- Race condition in `VisitQueue::pop`
- unsafe use of unsafe throughout the project
- Incorrect statement in HOW.md HOT 1
- Abmigious Interpretation of 0 pointer? HOT 1
- Code with HVM.log hangs HOT 4
- Rule flattening fails in some cases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hvm.