Skip to content

cabal init may use common stanza when choosing "Library and Executable" and version 2.2 or higher. #6143

Open
@kindaro

Description

Currently, a generated cabal file would look something like this:

cabal-version:       2.4
-- Initial package description 'x2.cabal' generated by 'cabal init'.  For
-- further documentation, see http://haskell.org/cabal/users-guide/

name:                x2
...

library
  -- exposed-modules:
  -- other-modules:
  -- other-extensions:
  build-depends:       base ^>=4.12.0.0
  hs-source-dirs:      src
  default-language:    Haskell2010

executable x2
  main-is:             Main.hs
  -- other-modules:
  -- other-extensions:
  build-depends:       base ^>=4.12.0.0
  hs-source-dirs:      src
  default-language:    Haskell2010

Surely build-depends, hs-source-dirs and default-language could be moved to a common stanza?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions