Comments (11)
Any news on that front ? I have just disabled ghc-mod
from emacs because it starts failing again (usually it does that after changing the .cabal
or stack
file), emacs
was like breathing again, much more responsive, ...
It reminds me how bad the situation is performance wise. Is there any hope for an improvement ?
from company-ghc.
I'd be interested in knowing if the slowness is coming from ghc-mod or actually the Elisp code itself. AFAIK upon opening a file the ghc-mod elisp bits load the list of symbols for each import into Emacs' memory. Does company-ghc does anything special or does it just use that symbol table?
I've been wanting to move completion and matching into the Haskell core proper for a while now because it always seemed like a bad idea to do that in Elisp. Though there are some tradeoffs to consider here. Namely you loose the ability to easily customize the matching method from Emacs since it would have to be embedded in ghc-mod's Haskell bits.
from company-ghc.
Does company-ghc does anything special or does it just use that symbol table?
It calls (ghc-sync-process "browse -d -o MODULE")
directly.
If it returns nil
, the same is called repeatedly when completion happens.
I suppose this causes the problem.
It is possible to change it not to call browse
after receiving nil
, but with this change, the MODULE won't be browsed even after compilation problem is solved.
I've been wanting to move completion and matching into the Haskell core proper for a while
I also think it is better since ghc-mod
knows (or can know) the project details (e.g. packages with version, CPP flags, etc).
from company-ghc.
It is possible to change it not to call browse after receiving nil, but with this change, the MODULE won't be browsed even after compilation problem is solved.
I'm considering some "guard time" before browsing MODULE after receiving nil
, although I am not sure it solves the problem or not.
@DanielG Aside from the above, is it possible to have a flag, predicate, hook or something in ghc-mod
that indicates the project is broken (i.e. if so, we should not call browse
) ?
from company-ghc.
I'm confused. check
returning a failure shouldn't also make browse
fail. browse
doens't use the state of the current file at all, it just looks at the package databases essentially.
from company-ghc.
I mean the situation ghc-mod
does not work completely (e.g. error from cabal-helper
)
from company-ghc.
Instead of guard time, I changed just not to browse module that failed once. PR #24.
from company-ghc.
How did you disable it. I've run in the same problem and it makes writing Haskell really tedious.
from company-ghc.
To disable company-ghc
, just not to add it to company-backends
.
If you meant to disable ghc-mod
, it depends on how you enable it.
from company-ghc.
from company-ghc.
I have not used spacemacs, but it seems that it does not use ghc-mod
as default completion.
http://spacemacs.org/layers/+lang/haskell/README.html#completion-support
from company-ghc.
Related Issues (20)
- Interactive-Haskell hangs HOT 5
- completion of symbols in current module when not compiling? HOT 5
- Symbol's value as variable is void: company-backends HOT 3
- Fuzzy match for module names HOT 3
- company-ghc backend not found HOT 2
- company-ghc-turn-on-autoscan not detected HOT 4
- [Question] Constantly "Loading symbols for XX ..." HOT 2
- ghc-boot process seems to have failed HOT 11
- Company-ghc fails to scan and load modules HOT 1
- Operator in candidates
- Show type info in annotation HOT 6
- Integrate with company-flx HOT 1
- nil candidates without any other errors HOT 22
- Unwanted "Visit tags table (default TAGS)" HOT 1
- No autocompletion candidates for symbols in current file HOT 4
- How I can stop company-ghc to inject close parenthesis on import module keyword? HOT 4
- company-ghc backend found: company-ghc but ghc-boot process has not been done HOT 2
- MELPA package missing HOT 1
- Company gives “Wrong type argument” error message HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from company-ghc.