commercialhaskell / commercialhaskell/stack

Optionally create wrappers for ghc programs on setup

Open
#5,515 0 comments 0 reactions 0 assignees View on GitHub
type: discuss type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

When a user uses stack to manage GHC installations they can call ghc programs (such as `ghc`, `ghci`, `runghc`, etc) directly by running for example `stack exec -- ghc Main.hs`. However, many tutorials and tools expect `ghc` and friends to be available on path.

In order to have `ghc` related programs available on path one can:

1. Install GHC separately
2. Create a wrapper shell program that runs `stack exec -- ghci $@`

I use (2) and it works pretty well, so my suggestion is to streamline (2) as a feature in stack: when running `stack setup`, stack could check if the ghc programs are available on path, and if they aren't suggest to create wrapper scripts for the user (in `~/.local/bin` for example).

The benefit is that users which are not interested in installing ghc manually can use tutorials and tools that expect ghc programs on path without modification.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.