Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

I can't seem to import GHC modules #3

Closed
mwotton opened this issue Apr 11, 2010 · 10 comments
Closed

I can't seem to import GHC modules #3

mwotton opened this issue Apr 11, 2010 · 10 comments

Comments

@mwotton
Copy link

mwotton commented Apr 11, 2010

I have the line

import GHC(parseStaticFlags, noLoc)

and flymake is choking on it, because it's in the hidden package ghc-6.12.1. Is there a place I can customise the packages flymake sees? It's in the cabal file for the package..

@kazu-yamamoto
Copy link
Collaborator

This problem can be fixed if we can specify "-package ghc", right?
If so, I can hack so that the option is automatically specifiedy if "import GHC" is found.
But it seems to me that linking the ghc library is very slow. Is it OK for you?

@mwotton
Copy link
Author

mwotton commented Apr 12, 2010

I think it's better to be slow than to just fail.
does ghc-mod keep a server process around, or is a new one started each time? you might be able to avoid the cost by keeping a pre-loaded server around.

@kazu-yamamoto
Copy link
Collaborator

A new one started each time.
Just a question. Can we use GHC as a server?

@mwotton
Copy link
Author

mwotton commented Apr 12, 2010

I think so - scion http://code.google.com/p/scion-lib/ starts up a scion-server process.

@kazu-yamamoto
Copy link
Collaborator

OK, I will look. Thank you for the information.
Since I'm very busy right now, I will come back to this issue on 23 April or so.

@kazu-yamamoto
Copy link
Collaborator

Current ghc-mod does not choke any lines if GHC module is used (not check any errors/warnings). Even if GHC API is used, checking a file with GHC modules is very slow. We need to consider special UI for the files using GHC modules so that only manual check is allowed.

@kazu-yamamoto
Copy link
Collaborator

Preventing linking results in confortable speed for -package ghc!

@mwotton
Copy link
Author

mwotton commented Apr 28, 2010

Heh. Great. you're using the ghc-API? I think there's an -fno-code option if you're just calling ghc.

@kazu-yamamoto
Copy link
Collaborator

Ah! I remember the option! I set the option in GHC API.

@mwotton
Copy link
Author

mwotton commented Apr 30, 2010

working great.

robrix pushed a commit to robrix/ghc-mod that referenced this issue Aug 19, 2017
Added percent decoding for file URIs
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants