haskell / haskell/haskell-language-server
Support "Run function" inline hints
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 13
Description
In major languages' IDEs, there will often be support for inline actions that allow running a main function. For example, Scala has the following action:

If we notice that a function is `IO ()`, then we could surely run it I imagine? I'm not sure who wrote the eval plugin, but this would be right up their alley!
-----------
A potential extension to this was discussed on discourse: https://discourse.haskell.org/t/hf-coordination-for-test-framework-ide-integration/5221/2?u=santiweight
One can imagine supporting some of the following use cases:
- Support running TestTree's and the like from `tasty` or `hspec`
- One could imagine supporting a code action that generates some random data for a function. For example, if we have a function `foo :: Int -> Bool -> Int`, we could provide a few random arguments and show the user what happens...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the eval plugin mentioned in the issue and reviewing how it evaluates Haskell expressions. Read the linked Discourse discussion for the proposed test-framework integration and clarify the initial scope, such as detecting IO () functions and exposing a Run function inline action. Done means the supported action is defined, implemented, and verified for the chosen use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100