haskell / haskell/cabal

Make value of Cabal flags accessible through an autogenerated Haskell module

Open
#11,258 5 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Say, I have `mypkg.cabal` containing:
~~~~
Flag special
Description: Extra feature for you
~~~~

It would nice if Cabal would create a file, say `Flag_mypkg.hs`, that I can use like so:
~~~~
import qualified Flag_mypkg

main :: IO ()
main =
if Flag_mypkg.special
then putStrLn "special"
else putStrLn "normal"
~~~~

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.