[Hackage] #217: Main modules in .hsc files are not included in sdist

Hackage trac at galois.com
Sat Jan 26 20:29:35 EST 2008

#217: Main modules in .hsc files are not included in sdist
  Reporter:  gwern          |        Owner:           
      Type:  defect         |       Status:  reopened 
  Priority:  normal         |    Milestone:  Cabal-1.4
 Component:  Cabal library  |      Version:  
  Severity:  normal         |   Resolution:           
  Keywords:                 |   Difficulty:  normal   
Ghcversion:  6.8.2          |     Platform:           
Comment (by duncan):

 Replying to [comment:7 ross at soi.city.ac.uk]:
 > I think it would be most intuitive if `main-is` always named the source
 file containing the Main module, i.e. if
 > {{{
 > main-is:  Hslock.hsc
 > }}}
 > worked for both build and sdist.

 On reflection, I'm not so sure. In general when we have arbitrary pre-
 processors there may be a tree of files used to generate a source
 module/file. So it's right to name the module or ultimate file rather than
 one of the files used to generate it (if indeed it is generated from
 another file at all). So in the general case it is the only thing we can

 It's also a good deal easier in the code, it means we do not have to pass
 into the per-compiler code where the pre-processed .hs/.lhs file is to be
 found (something we do not do for exposed/other-modules). It means the
 per-compiler build code can just assume the file has been generated and
 can be found in the search path.

 So I'll take a look at fixing the src dist side of things, so that it
 finds the stuff used to generate the main .hs/.lhs and includes that into
 the tarball. It should be just a minor adaption on what the code does
 already for the other-modules.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/217#comment:10>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list