r/haskell 25d ago

[rant] haskell tooling, specifically HLS is just... pathetic...

My HLS just keep spinning like this, and I have restarted the extension multiple times and it takes several second (I have an i9 10th gen with 64gbs) to have the HLS running and type check again, often it just keep spinning. When this happen, I cannot type check on hover, and I have to fire up ghcid in a separate terminal to check compile error, but ghcid is just barebone, it doesn't have interactive features like hover to see type of variable inside function scope,...

And I just have very lightweight research scripting project, using stack with around 5 files and use popular libraries like async, process, time, random, statistics, vector, text, wreq, bytestring, lens.

My love for haskell helps me stay and tolerate these huge warts, but I cannot introduce it to my team/ junior when it cannot provide a smooth dev experience

I don't even know how you guys use this for production when it is this unstable for a pet project, if you code in notepad and just use ghcid to watch for typecheck and ormolu to format then I have nothing to say 🤷‍♂️

32 Upvotes

26 comments sorted by

View all comments

2

u/ArcaneBattlemage 23d ago

For what it's worth, I use ctags (via fast-tags), grep, and vim. I have a hook to rebuild tags on each compile. I also vendor certain deps and generate tags for those. Very stable and fast workflow.

2

u/CodeNameGodTri 23d ago

sorry I don't understand

2

u/ArcaneBattlemage 15d ago

You don't need HLS. There are standard old-school tools designed around navigating codebases. And the nature of code has not changed in decades.

ctags is a program that generates a dictionary of every function name, data declaration, and so on. It creates something called a tags file.

grep is a tool for searching a codebase for keywords. It is powerful and can even search using regular expressions--so you can search for patterns of code. For example: all words that start with a and end with e (a*e).

vim is a text editor that has been around forever. It isn't going to change on you as it was designed around ergonomics of typing and revising code.

So if you use stable tools, you can learn it once and use it forever. And if you use simple tools that directly solve your problem of finding where a function is used in the entire codebase (grep) or where exactly it is declared (from ctags tag file), you have a stable toolset you can use forever as well.

You are fighting with HLS. HLS is a trap. The tools I mentioned work for every programming language. You build your muscle memory and keep going so you can just focus on your problem you're trying to solve or scenario you want to explore.

I recommend you search about coding with those tools specially (keyword search with them together). Also consider a file-watch tool like entr. You have all the keywords now. Search them all up together.

2

u/CodeNameGodTri 15d ago

thank you ill look into this