mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 12:37:32 +03:00
tests run but still can't compile tricky function
This commit is contained in:
parent
e79010a70b
commit
8481921756
1
TODO.md
1
TODO.md
@ -1,5 +1,6 @@
|
||||
# Compiler
|
||||
- Bake fails: (fn [f a b] (println (ref (str (f a b)))))
|
||||
- Bake can't handle when a function changes signature
|
||||
- Automatically implement for structs and arrays:
|
||||
- str
|
||||
- copy
|
||||
|
@ -78,8 +78,25 @@
|
||||
|
||||
|
||||
(defn problematic [prob-f prob-a prob-b]
|
||||
(println (ref (str (prob-f prob-a prob-b)))))
|
||||
;;(println (ref (str )))
|
||||
(prob-f (ref prob-a) (str prob-b))
|
||||
)
|
||||
|
||||
;; (defn problematic [x y z]
|
||||
;; (x z))
|
||||
|
||||
|
||||
(def prob-ast (lambda-to-ast (code problematic)))
|
||||
;; (def prob-asta (annotate-ast prob-ast))
|
||||
|
||||
;; (println (str (let [ast-func-deps (find-func-deps prob-ast '())
|
||||
;; ast-typed (infer-types ast-func-deps '())
|
||||
;; ast-named (generate-names (copy {}) ast-typed)
|
||||
;; ast-lifetimes (calculate-lifetimes ast-named)
|
||||
;; _ (println (str ast-lifetimes))
|
||||
;; ;;ast-generics (visit-generic-funcs ast-lifetimes)
|
||||
;; ]
|
||||
;; ;;ast-lifetimes
|
||||
;; ;;ast-generics
|
||||
;; nil
|
||||
;; )))
|
||||
|
Loading…
Reference in New Issue
Block a user