Skip to content

Conversation

ppolesiuk
Copy link
Member

This PR introduces definition of the Surface language. REPL related parts are not implemented.

The code uses type synonyms, that are not merged into master branch of DBL, yet.

@ppolesiuk ppolesiuk requested a review from forell May 19, 2025 17:57
Copy link
Member

@dominik-muc dominik-muc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@forell forell left a comment

Choose a reason for hiding this comment

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

Looks good to me, I left some minor nitpicking comments but feel free to disregard.

Comment on lines +63 to +64
| NPName of { ~pos : Position }, T
| NPSel of { ~pos : Position }, Path ModuleName, T
Copy link
Member

Choose a reason for hiding this comment

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

FYI the prefix "NP" originally stood for "Namespace Path", dating back to when modules were briefly called namespaces. Maybe it's time to update it to something more informative, like "MP".

{## Named parameter of the type scheme. ##}
pub data SchemeArg =
{## Type parameter. ##}
| SA_Type of { ~pos : Position }, TName, TVar, KindExpr
Copy link
Member

Choose a reason for hiding this comment

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

So, what are the conventions for multicharacter prefixes in constructors? TName gets TN with no underscore, this gets SA_, and there are both variants elsewhere too. I don't really have a preference myself.

end

{## File. ##}
pub data File =
Copy link
Member

Choose a reason for hiding this comment

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

Should a File have a ~pos for the purpose of retrieving the filename easily, or is that unlikely to be useful?

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