Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework AST #3

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Rework AST #3

merged 4 commits into from
Apr 16, 2024

Conversation

WoWaster
Copy link
Member

No description provided.

@WoWaster WoWaster requested a review from KubEF April 16, 2024 08:43
@WoWaster WoWaster self-assigned this Apr 16, 2024
)

-- | Function name, must be lowercase
newtype Fun = FunName {funName :: Text}
Copy link
Collaborator

Choose a reason for hiding this comment

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

А почему не type Fun = Text ? Просто тут как будто избыточность какая-то возникает

Copy link
Member Author

Choose a reason for hiding this comment

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

У нас вырисовываются три раздельных пространства имён: функции, переменные и конструкторы. Разделение на три точно разных типа выглядит очень даже оправданно в данном случае

lang/app/Main.hs Outdated Show resolved Hide resolved
Con Con [Expr]
| -- | Lambda abstraction
Lam Var Expr
| -- | Function call
Copy link
Member

Choose a reason for hiding this comment

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

А можно для дебилов: чем вызов функции от применения отличется?

Copy link
Member Author

Choose a reason for hiding this comment

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

Как я понимаю, узел Fun просто висит слева в аппликации и хранит в себе имя функции. Всё. Вероятно так удобнее для дистилляции :)
@KubEF, поправь, пожалуйста, если я не прав

Copy link
Collaborator

Choose a reason for hiding this comment

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

Да, всё вроде так.

For some reason it's broken with --amend and now deprecated
@KubEF KubEF merged commit 07c22b1 into main Apr 16, 2024
7 checks passed
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.

3 participants