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:
Erik 2016-03-22 17:26:01 +01:00
parent 4742111387
commit 4c2d32b457
3 changed files with 4 additions and 12 deletions

View File

@ -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

View File

@ -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)

View File

@ -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?")) {