Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Ghc mod find #135

Merged
merged 3 commits into from
Dec 16, 2015
Merged

Ghc mod find #135

merged 3 commits into from
Dec 16, 2015

Conversation

JPMoresmau
Copy link
Contributor

Implement the find command since it was a placeholder. The issue was that the find command in ghc-mod launches another copy of the executable. The source doesn't say why, and if dumping the symbol file in the same session should be avoided. It works without it: I basically just copied the code from findSymbol. The return type is a ModuleList, a specific type added to SemanticTypes.
A side effect is that CtxProject does require the project directory, since we need it for ghc-mod. So there's a dir parameter for CtxProject commands. Its type is still PtFile, not sure it's worth creating a different PtDir parameter type.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@DanielG
Copy link
Collaborator

DanielG commented Dec 15, 2015

We fork() the dump symbol table function because of a memory leak in GHC FYI.

@alanz
Copy link
Collaborator

alanz commented Dec 16, 2015

@DanielG does the leak occur in all GHC versions?

alanz added a commit that referenced this pull request Dec 16, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Ghc mod find
@alanz alanz merged commit 2947e3a into haskell:master Dec 16, 2015
@alanz alanz added this to the prehistory milestone Feb 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants