Skip to content

Exclude modules from executable #421

Description

@andreasabel

I tried to apply recipe #409 to executables but it does not seem to work.

This is the respective section of my package.yaml (it does not have a library section):

executables:
  LR:
    main: LR.hs
    # Exclude some files according to recipe https://github.com/sol/hpack/issues/409
    when:
      condition: false
      other-modules:
        BugLRec
        CYK
        LBNF.ErrM
        LBNF.Skel
        LBNF.Test

The generated .cabal file still contains all these modules:

executable LR
  main-is: LR.hs
  other-modules:
      BugLRec
      CFG
      CharacterTokenGrammar
      CYK
      DebugPrint
      LBNF.Abs
      LBNF.ErrM
      LBNF.Lex
      LBNF.Par
      LBNF.Print
      LBNF.Skel
      LBNF.Test
      ParseTable
      ParseTable.Pretty
      Saturation
      SetMaybe
      Util
      Paths_LR_demo

hpack seems to ignore other-modules in the when section altogether.

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions