Try haskell-ide-engine on GHC!

Matthew Pickering matthewtpickering at gmail.com
Fri Jul 26 10:54:35 UTC 2019


You can also try placing the following `hie.yaml` file in the
`hadrian` subdirectory so that it works when developing hadrian.

```
cradle: {cabal: {component: "exe:hadrian"}}
```

On Fri, Jul 26, 2019 at 11:31 AM Matthew Pickering
<matthewtpickering at gmail.com> wrote:
>
> I noticed myself that things start going quite badly when you start
> opening files which are not part of the main ghc library. The
> workaround to this is to place a `hie.yaml` file in a subdirectory so
> indicate that a certain subdirectory shouldn't use the same settings
> as compiler. For example, I placed this cradle in the `default
>
> ```
> cradle: {default}
> ```
>
> I should probably add a `cradle: [none}` option as well just to
> disable HIE on certain files, it will never be able to work loading
> some tests as they require a HEAD version of GHC.
>
> In the future I would like to teach hadrian to be able to load any GHC
> component built in stage1 into GHCi, it should not be much work, but I
> haven't got around to it yet.
>
> On Fri, Jul 26, 2019 at 11:24 AM Alp Mestanogullari <alp at well-typed.com> wrote:
> >
> > Maybe we can just remove those lines now. :-)
> >
> > On 26/07/2019 11:36, Sebastian Graf wrote:
> >
> > Hey all,
> >
> > What can I say, after few hours of on and off tinkering I got it to work!
> > The hover information is incredibly helpful, as is jump to definition. It works even in modules with type and name errors!
> > The error information not so much (yet), at least not compared to the shorter feedback loop of using ghcid.
> > Haven't used completions in anger yet, but it works quite well when fooling around with it.
> >
> > Great work, Zubin and Matthew! :)
> >
> > As to my setup: I'm using VSCode Remote, so the language server will run on my build VM which VSCode communicates with via SSH.
> > I'm using nix+home-manager to manage my configuration over there, so I had to wrap the hie executable with the following script:
> >
> > #! /usr/bin/env bash
> > . /etc/profile.d/nix.sh
> > nix-shell --pure /path/to/ghc.nix/ --run /path/to/haskell-ide-engine/dist-newstyle/build/x86_64-linux/ghc-8.6.4/haskell-ide-engine-1.0.0.0/x/hie/build/hie/hie
> >
> > Also the shellHook echo output from ghc.nix confuses the language server protocol, so be sure to delete those 4 lines from ghc.nix/default.nix.
> >
> > It takes quite a while to initialise the first time around. Be sure to look at the output of the alanz.vscode-hie-server extension to see if there's any progress being made.
> > Can only encourage you to try this out!
> >
> > Best,
> > Sebastian
> >
> >
> > Am Do., 25. Juli 2019 um 12:21 Uhr schrieb Matthew Pickering <matthewtpickering at gmail.com>:
> >>
> >> Hi all,
> >>
> >> As some of you know I have been working on getting haskell-ide-engine
> >> working on GHC for the last few months. Perhaps now the branch is in a
> >> usable state where people can try it and report issues. All the basic
> >> features such as, hover, completion, error reporting, go to definition
> >> etc should work well. I suspect this will be enough for most
> >> developers.
> >>
> >> I have compiled a list of instructions about how to try out the branch.
> >>
> >> https://gist.github.com/mpickering/68ae458d2c426a29a7c1ddf798dbc793
> >>
> >> In the last few weeks Zubin has been a great help finishing some parts
> >> of the patch that I lost steam for and given it a much better chance
> >> of getting merged into the main repo before the end of the year.
> >>
> >> Cheers,
> >>
> >> Matt
> >> _______________________________________________
> >> ghc-devs mailing list
> >> ghc-devs at haskell.org
> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> >
> >
> > _______________________________________________
> > ghc-devs mailing list
> > ghc-devs at haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> >
> > --
> > Alp Mestanogullari, Haskell Consultant
> > Well-Typed LLP, https://www.well-typed.com/
> >
> > Registered in England and Wales, OC335890
> > 118 Wymering Mansions, Wymering Road, London, W9 2NF, England
> >
> > _______________________________________________
> > ghc-devs mailing list
> > ghc-devs at haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


More information about the ghc-devs mailing list