Skip to content

Miniml#30

Open
ilq1 wants to merge 19 commits into
Kakadu:masterfrom
ilq1:miniml
Open

Miniml#30
ilq1 wants to merge 19 commits into
Kakadu:masterfrom
ilq1:miniml

Conversation

@ilq1
Copy link
Copy Markdown

@ilq1 ilq1 commented Apr 3, 2026

interpreter miniml
author: Kalashnikov Andrey

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zanuda-linter report

Comment thread KalashnikovAndrey/lib/Printer.ml
Comment thread KalashnikovAndrey/lib/interpret.ml Outdated

let initial_env = [ "print", VBuiltin builtin_print ]

let rec check_env key env : value StateError.t =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using function is recommended

Comment thread KalashnikovAndrey/lib/parser.ml Outdated

let is_keyword_next_helper input key =
let k_len = String.length key in
if not (String.starts_with ~prefix:key input)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing 'if ... then false' smells bad

Comment thread KalashnikovAndrey/lib/parser.ml Outdated
let k_len = String.length key in
if not (String.starts_with ~prefix:key input)
then false
else if String.length input == k_len
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing 'if ... then true' smells bad

Comment thread KalashnikovAndrey/lib/parser.ml Outdated
let k_len = String.length key in
if not (String.starts_with ~prefix:key input)
then false
else if String.length input == k_len
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No description provided.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zanuda-linter report

Comment thread KalashnikovAndrey/lib/Printer.ml
Comment thread KalashnikovAndrey/lib/interpret.ml Outdated

let initial_env = [ "print", VBuiltin builtin_print ]

let rec check_env key env : value StateError.t =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using function is recommended

Comment thread KalashnikovAndrey/lib/parser.ml Outdated

let is_keyword_next_helper input key =
let k_len = String.length key in
if not (String.starts_with ~prefix:key input)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing 'if ... then false' smells bad

Comment thread KalashnikovAndrey/lib/parser.ml Outdated
let k_len = String.length key in
if not (String.starts_with ~prefix:key input)
then false
else if String.length input == k_len
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing 'if ... then true' smells bad

Comment thread KalashnikovAndrey/lib/parser.ml Outdated
let k_len = String.length key in
if not (String.starts_with ~prefix:key input)
then false
else if String.length input == k_len
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No description provided.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zanuda-linter report

@@ -0,0 +1,37 @@
[@@@ocaml.text "/*"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File 'KalashnikovAndrey/lib/Printer.ml' doesn't have corresponding .mli interface

Comment thread KalashnikovAndrey/lib/interpret.ml Outdated

let rec check_env key : env -> value StateError.t = function
| [] -> StateError.fail (Var_unbound key)
| (k, v) :: rest -> if k = key then StateError.return v else check_env key rest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer guard instead of if-then-else in case construction

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 4, 2026

Документация и тестовое покрытие (90.85%) должны скоро появиться.

https://kakadu.github.io/fp25/docs/KalashnikovAndrey

https://kakadu.github.io/fp25/cov/KalashnikovAndrey

2026-04-04 14:19

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zanuda-linter report

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 4, 2026

Linter report from 2026-04-04 14:20, for mini language KalashnikovAndrey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant