haskell / haskell/cabal

Support `main-is` inside "common stanzas"

Open
#6,117 6 comments 1 reaction 0 assignees View on GitHub
Cabal: common stanza Cabal: file format re: main type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

My use case is that I have a lot of executables placed in different folders. Every executable contains a single Haskell source code file called `Main.is`. I would like to remove some boilerplate by putting `main-is: Main.hs` into `common` stanza (with other options). However, when I do this, I see the following build error message:

```
No 'main-is' field found for executable my-exe1
No 'main-is' field found for executable my-exe2
No 'main-is' field found for executable my-exe3
No 'main-is' field found for executable my-exe4
No 'main-is' field found for executable my-exe5
```

It would be really nice if common stanzas could support `main-is` field as well.

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.