Skip to content

Fix :browse Prim in REPL, it has no ExternsFile#3246

Merged
kritzcreek merged 2 commits into
purescript:masterfrom
rndnoise:fix-2672
Apr 14, 2018
Merged

Fix :browse Prim in REPL, it has no ExternsFile#3246
kritzcreek merged 2 commits into
purescript:masterfrom
rndnoise:fix-2672

Conversation

@rndnoise

@rndnoise rndnoise commented Feb 18, 2018

Copy link
Copy Markdown
Contributor

The reason :browse Prim failed is that there's not an entry in psciLoadedExterns for Prim. This fixes #2672

@garyb

garyb commented Feb 25, 2018

Copy link
Copy Markdown
Member

Seems good to me 👍 I'm not too familiar with the REPL code though, so anyone else want to comment?

Comment thread src/Language/PureScript/Interactive.hs Outdated
qualMod = fromMaybe needle (lookupUnQualifiedModName needle imports)
primMod = P.ModuleName [P.ProperName "Prim"]
modules = S.fromList (primMod : (P.getModuleName . fst <$> externs))
in if qualMod `S.member` modules

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Something seems weird with the let ... in indentation here. I think the in should be one space to the left?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure! I looked for other examples of multi-line let ... in .... I only found one or two, so I have emulated those. If that's not what you intended, I have no problem changing it.

@rndnoise rndnoise changed the title Fix :browse Prim, it has no ExternsFile (Fix #2672) Fix :browse Prim in REPL, it has no ExternsFile Mar 23, 2018
@kritzcreek kritzcreek merged commit 21760f7 into purescript:master Apr 14, 2018
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.

:browse Prim does not work

4 participants