mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 20:49:05 +03:00
can't find bug: (map println state) makes the type system create an instance of "map" that expects a void->void function
This commit is contained in:
parent
4742111387
commit
4c2d32b457
1
TODO.md
1
TODO.md
@ -1,6 +1,5 @@
|
||||
# Compiler Big Features
|
||||
- A deref function that can remove the ref from primitive types?
|
||||
- (map println state) makes the type system create an instance of "map" that expects a void->void function
|
||||
- Don't compile a function if there's already an adequate build artifact
|
||||
- Compile globals so that they can be mutated (and all references refer to the same storage)
|
||||
- Collect all unification errors and present them in the end
|
||||
|
@ -1,14 +1,7 @@
|
||||
|
||||
(defn f [x]
|
||||
(+ 2.0 x))
|
||||
(defn f []
|
||||
(domap println &[(copy "hej") (copy "san") (copy "svej") (copy "san")]))
|
||||
|
||||
(f 5.0)
|
||||
(f)
|
||||
|
||||
(bake f)
|
||||
|
||||
(defn g []
|
||||
(f 3.2))
|
||||
|
||||
(bake g)
|
||||
|
||||
|
||||
|
@ -1031,7 +1031,7 @@ void eval_list(Obj *env, Obj *o) {
|
||||
Obj *val = stack_pop();
|
||||
global_env_extend(key, val);
|
||||
//printf("def %s to %s\n", obj_to_string(key)->s, obj_to_string(val)->s);
|
||||
obj_set_meta(val, obj_new_keyword("name"), obj_to_string(key));
|
||||
//obj_set_meta(val, obj_new_keyword("name"), obj_to_string(key));
|
||||
stack_push(val);
|
||||
}
|
||||
else if(HEAD_EQ("def?")) {
|
||||
|
Loading…
Reference in New Issue
Block a user