Skip to content

Allow executables to also be scripts #10324

@philderbeast

Description

@philderbeast

... offer the option to install each standalone *.hs script by listing them as executables in the package.

Originally posted by @philderbeast in #10317 (comment)

Please allow at least single file, self contained executables to be run as scripts. I tried this with #10320 but was rebuffed with:

$ ./cabal-validate/main/Main.hs
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
Error: [Cabal-7070]
The run command can only run an executable as a whole, not files or modules within them,
but the target 'main/Main.hs' refers to the file main/Main.hs in the executable cabal-validate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions