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

adding qualified name lookup for psci :browse issue #974 #1824

Merged
merged 1 commit into from Jan 24, 2016
Merged

adding qualified name lookup for psci :browse issue #974 #1824

merged 1 commit into from Jan 24, 2016

Conversation

soupi
Copy link
Contributor

@soupi soupi commented Jan 13, 2016

as requested here.

Nothing ->
PSCI $ outputStrLn $ "Module '" ++ N.runModuleName moduleName ++ "' is not valid."
Just qualifiedName ->
handleBrowse qualifiedName
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, we're running make twice. Can we avoid that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can just copy and run the if on line 489 again instead, would that be better?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, let's not copy it. Maybe we can extract it into a separate function.

@paf31
Copy link
Contributor

paf31 commented Jan 22, 2016

@garyb Let's include this one in 0.8, yes?

@garyb
Copy link
Member

garyb commented Jan 22, 2016

Sure, sounds good to me 👍

failNotInEnv moduleName
where
isModInEnv modName st =
isJust $ find ((\ (P.Module _ _ mName _ _ ) -> mName == modName) . snd) (psciLoadedModules st)
Copy link
Contributor

Choose a reason for hiding this comment

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

isJust . find = any

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, you can then eta-reduce:

isModInEnv modName = any ((== modName) . getModuleName . snd) . psciLoadedModules

@paf31
Copy link
Contributor

paf31 commented Jan 22, 2016

@soupi I added a couple more comments here. If you could have a quick look, I'll get this merged in before the next RC. Thanks!

@soupi
Copy link
Contributor Author

soupi commented Jan 22, 2016

@paf31 thanks for the suggestions! I made the changes and squashed the commits by doing a force push. I hope that's alright.

paf31 added a commit that referenced this pull request Jan 24, 2016
adding qualified name lookup for psci :browse issue #974
@paf31 paf31 merged commit f4d109c into purescript:master Jan 24, 2016
@paf31
Copy link
Contributor

paf31 commented Jan 24, 2016

Thanks very much!

@soupi
Copy link
Contributor Author

soupi commented Jan 24, 2016

gladly!

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.

None yet

3 participants