Arzhaev - #32
Conversation
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
Signed-off-by: InfernalKn1ght <arzhaev.dmitry@yandex.ru>
| @@ -0,0 +1,227 @@ | |||
| [@@@ocaml.text "/*"] | |||
There was a problem hiding this comment.
File 'Arzhaev/lib/tests.ml' doesn't have corresponding .mli interface
| { vars = StrSet.to_list (get_set env ty); ty } | ||
| ;; | ||
|
|
||
| let rec infer env exp = |
There was a problem hiding this comment.
Using function is recommended
| | _ -> fail ITypeError | ||
| ;; | ||
|
|
||
| let infer_toplevel env tl = |
There was a problem hiding this comment.
Using function is recommended
| type 'a t = 'a StringMap.t | ||
|
|
||
| let empty = StringMap.empty | ||
| let lookup x env = StringMap.find_opt x env |
There was a problem hiding this comment.
Eta reduction proposed. It's recommended to rewrite 'fun x ->
fun env ->
StringMap.find_opt x
env' as 'StringMap.find_opt'
| | _ -> fail (RNotAFunction vfun) | ||
| ;; | ||
|
|
||
| let eval_toplevel env tl = |
There was a problem hiding this comment.
Using function is recommended
| { vars = StrSet.to_list (get_set env ty); ty } | ||
| ;; | ||
|
|
||
| let rec infer env exp = |
There was a problem hiding this comment.
Using function is recommended
| | _ -> fail ITypeError | ||
| ;; | ||
|
|
||
| let infer_toplevel env tl = |
There was a problem hiding this comment.
Using function is recommended
|
Документация и тестовое покрытие (90.67%) должны скоро появиться. https://kakadu.github.io/fp25/docs/Arzhaev https://kakadu.github.io/fp25/cov/Arzhaev 2026-04-25 11:05 |
| | _ -> fail (RNotAFunction vfun) | ||
| ;; | ||
|
|
||
| let eval_toplevel env tl = |
There was a problem hiding this comment.
Using function is recommended
| { vars = StrSet.to_list (get_set env ty); ty } | ||
| ;; | ||
|
|
||
| let rec infer env exp = |
There was a problem hiding this comment.
Using function is recommended
| | _ -> fail ITypeError | ||
| ;; | ||
|
|
||
| let infer_toplevel env tl = |
There was a problem hiding this comment.
Using function is recommended
| helper (String.length s - 1) [] | ||
| ;; | ||
|
|
||
| let get_next_letter c = |
There was a problem hiding this comment.
Using function is recommended
|
Linter report from 2026-04-25 11:06, for mini language Arzhaev |
Type inference
boolean operators