Skip to content

Choosing library in init dialogue still creates exe dir #6772

Closed
@emilypi

Description

@emilypi

Describe the bug
Choosing the "library" option in the interactive init script still produces a exe directory

To Reproduce
Follow the init steps for a new library. Example:

λ П(a: A) haskell → mkdir foo
λ П(a: A) haskell → cd foo
λ П(a: A) foo → cabal init
Should I generate a simple project with sensible defaults? [default: y] n
What does the package build:
   1) Executable
   2) Library
   3) Library and Executable
Your choice? 2
Package name? foo
This package name is already used by another package on hackage. Do you want to choose a different name? [default: y] n
Package version? [default: 0.1.0.0] 
Author name? [default: Emily Pillmore] 
Maintainer email? [default: emilypi@cohomolo.gy] 
Project homepage URL? 
Project synopsis? 
Project category:
 * 1) (none)
   2) Codec
   3) Concurrency
   4) Control
   5) Data
   6) Database
   7) Development
   8) Distribution
   9) Game
  10) Graphics
  11) Language
  12) Math
  13) Network
  14) Sound
  15) System
  16) Testing
  17) Text
  18) Web
  19) Other (specify)
Your choice? [default: (none)] 
Add informative comments to each field in the cabal file (y/n)? [default: n] n

Guessing dependencies...

Generating LICENSE...
Generating Setup.hs...
Generating CHANGELOG.md...
Generating src/MyLib.hs...
Generating test/MyLibTest.hs...
Generating foo.cabal...

Warning: no synopsis given. You should edit the .cabal file and add one.
You may want to edit the .cabal file and add a Description field.
λ П(a: A) foo → ls -l
total 32
-rw-r--r--  1 emilypi  staff   106 May 10 01:53 CHANGELOG.md
-rw-r--r--  1 emilypi  staff  1526 May 10 01:53 LICENSE
-rw-r--r--  1 emilypi  staff    46 May 10 01:53 Setup.hs
drwxr-xr-x  2 emilypi  staff    64 May 10 01:53 exe
-rw-r--r--  1 emilypi  staff   854 May 10 01:53 foo.cabal
drwxr-xr-x  3 emilypi  staff    96 May 10 01:53 src
drwxr-xr-x  3 emilypi  staff    96 May 10 01:53 test
λ П(a: A) foo → 

Expected behavior
Shouldn't do that.

System information

  • Mac
  • Cabal 3.2
  • GHC 8.10.1

Metadata

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