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

Use global node_modules path to find aqua dependencies #450

Merged
merged 6 commits into from
Mar 9, 2022

Conversation

DieMyst
Copy link
Member

@DieMyst DieMyst commented Mar 8, 2022

fixes #448

@DieMyst DieMyst requested a review from alari March 8, 2022 11:16
@DieMyst DieMyst self-assigned this Mar 8, 2022
@DieMyst
Copy link
Member Author

DieMyst commented Mar 9, 2022

fixes #85 also

@@ -145,8 +146,16 @@ class TypesInterpreter[S[_], X](implicit lens: Lens[X, TypesState[S]], error: Re
expected: Type,
givenType: Type
): State[X, Boolean] =
// TODO in case of two literals, check for types intersection?
if (expected.acceptsValueOf(givenType)) State.pure(true)
val canCompare = (expected, givenType) match {
Copy link
Member

Choose a reason for hiding this comment

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

Let's introduce a new function to check whether values are comparable.

if (expected.acceptsValueOf(givenType)) State.pure(true)
val canCompare = (expected, givenType) match {
case (LiteralType(xs, _), LiteralType(ys, _)) =>
if (xs.intersect(ys).isEmpty)
Copy link
Member

Choose a reason for hiding this comment

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

Why if/else? Just xs.intersect(ys).nonEmpty

@DieMyst DieMyst merged commit 04e68b5 into main Mar 9, 2022
@DieMyst DieMyst deleted the use-global-node-modules branch March 9, 2022 15:54
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.

Cannot compile aqua file if imports were installed globally
2 participants