You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
This appears to be a poor interaction with setting a default application-dir in the cabal config file (or if you explicitly specify --application-dir=exe from the command line). The following produces the same results:
$ mkdir foo
$ cd foo
$ cabal init --non-interactive --lib --application-dir=exe
$ ls
CHANGELOG.md exe MyLib.hs Setup.hs
Added a statement in getAppDir function for if the package type
is Library, then return Just [] to appDirs else perform normal
return function.
Removed noAppDirIfLibrary function as the new if statement
handles the Library type.
Resolves: haskell#6772
Describe the bug
Choosing the "library" option in the interactive init script still produces a
exe
directoryTo Reproduce
Follow the init steps for a new library. Example:
Expected behavior
Shouldn't do that.
System information
The text was updated successfully, but these errors were encountered: