Skip to content

Concrete syntax for handler types#337

Open
JakubZojdzik wants to merge 3 commits intofram-lang:masterfrom
JakubZojdzik:develop
Open

Concrete syntax for handler types#337
JakubZojdzik wants to merge 3 commits intofram-lang:masterfrom
JakubZojdzik:develop

Conversation

@JakubZojdzik
Copy link
Copy Markdown
Contributor

Comment thread src/TypeInference/Type.ml Outdated
let (in_env, _) = Env.enter_scope env in
let (in_env, eff_var) = Env.add_tvar ~pos in_env effct T.Kind.k_effect in
let (in_env, eff_var) =
if String.equal effct "_" then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Couldn't think of anything more elegant as effct is expected to be string everywhere

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally, it is good practice to avoid if-expressions, where the problem can be solved by pattern-matching. It would be better to change the definition of THandler constructor and have effct field of the option type.

@JakubZojdzik JakubZojdzik marked this pull request as ready for review April 21, 2026 20:44
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.

2 participants