-
Notifications
You must be signed in to change notification settings - Fork 28
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
Naïve compilation of refining patterns #242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice feature! I just have a few minor comments for now. Please address them first.
b652421
to
eeca145
Compare
hkmc2/shared/src/main/scala/hkmc2/semantics/ucs/DesugaringBase.scala
Outdated
Show resolved
Hide resolved
hkmc2/shared/src/main/scala/hkmc2/semantics/ucs/DesugaringBase.scala
Outdated
Show resolved
Hide resolved
hkmc2/shared/src/main/scala/hkmc2/semantics/ucs/DesugaringBase.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice work! But there are still some things to address.
case S(cls: (ClassSymbol | ModuleSymbol)) => | ||
raise(ErrorReport(msg"Cannot match ${ctor.describe} as a string prefix" -> ctor.toLoc :: Nil)) | ||
val kind = cls match { case _: ClassSymbol => "class" case _ => "module" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should rather use cls.tree.k
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. There is a small problem, tree
is a val
defined on both ClassSymbol
and ModuleSymbol
independently (no base class has such a field), so I can't simply access it with cls.tree
. Do you have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think you can just declare an abstract val
in MemberSymbol
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's the case, I need to implement tree: Tree
in BlockMemberSymbol
, TermSymbol
, TypeAliasSymbol
, and TopLevelSymbol
. Sorry, I need more guidance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok forget it for now.
No description provided.