haskell / haskell/haskell-mode

Feature request: "cabal repl" with file target

Open
#1,812 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

I like to use "single cabal script" a lot for small examples, e.g.:

`$ cat ~/Templates/cabalscript.hs`:
```haskell
#!/usr/bin/env cabal
{- cabal:
build-depends: base
-}

main = do
putStrLn "Hello World!"
_ <- readLn :: IO String
return ()
```

If one could test this by typing "C-c C-l" that'd grand, since cabal pull in all the dependencies encoded in the special comments area. ~~I suspect we need a new type for `haskell-process-type`?~~

~~Also any pointer to where to look at for start hacking on it?~~

Edit: I have found a workaround of using the filename itself as the cabal-repl target.

Contributor guide

Open the contributing guide

Research direction

Start at the C-c C-l command and its cabal-repl target handling, especially the haskell-process-type path. Reproduce the single cabal script example and compare it with the filename workaround; done means C-c C-l launches a REPL using dependencies in the script's special comments.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, emacs-lisp, haskell
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.