mpickering / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Add proper support for the 'none' cradle #40

Closed mpickering closed 5 years ago

mpickering commented 5 years ago

The main change here is making runActionWithContext take an additional default argument which can be returned in the case that we discover that we shouldn't try to understand or process a specific file we are asked to understand.

lukel97 commented 5 years ago

You might also want to take a look at preventing regular IReqs from going through modules with a none cradle

mpickering commented 5 years ago

You might also want to take a look at preventing regular IReqs from going through modules with a none cradle

Presumable IReq requests should succeed independently of any GHC session and thus for any Haskell source file so this treatment isn't necessary?

lukel97 commented 5 years ago

Not always, IReqs can ask for GHC modules through deferred requests. I think hover and document symbols are done through IReqs, although maybe they behave ok already?

On 19 Oct 2019, at 17:59, Matthew Pickering notifications@github.com wrote:

 You might also want to take a look at preventing regular IReqs from going through modules with a none cradle

Presumable IReq requests should succeed independently of any GHC session and thus for any Haskell source file so this treatment isn't necessary?

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub, or unsubscribe.

mpickering commented 5 years ago

Review please @fendor ?

mpickering commented 5 years ago

I fixed a bug in this implementation that @eddiejones2108 found.

What is your suggest implementation @fendor ?

fendor commented 5 years ago

@mpickering I dont have any better idea for the API for now. If we come up with a better one, we can implement it. Does this branch need to be rebased since #26 had some additional commits?