Ticket #14 (closed defect: fixed)

Opened 7 years ago

Last modified 5 years ago

allow preprocessing for Main modules

Reported by: ijones Owned by: duncan
Priority: high Milestone: Cabal-1.2
Component: Cabal library Version: 1.1.3
Severity: normal Keywords:
Cc: Difficulty: easy
GHC Version: 6.2.1 Platform: Linux

Description

It is not clear how to build an executable whose Main module is preprocessed. The following does not work: Executable: Foo Main-is: Main.hsc

Attachments

pre-processing-main.dpatch Download (2.6 KB) - added by duncan 5 years ago.
Fix preprocessing for executables, and allow preprocessing of main

Change History

Changed 6 years ago by ijones

  • difficulty set to easy

Changed 5 years ago by duncan

Fix preprocessing for executables, and allow preprocessing of main

Changed 5 years ago by duncan

  • owner changed from ijones to duncan
  • platform set to Linux
  • ghcversion set to 6.2.1
  • status changed from new to assigned

This second patch has been committed to Cabal HEAD. Perhaps someone can test and confirm this as I've only tested one small example.

One actually needs to say:

Executable: Foo
Main-is: Main.hs

and it'll look for any suitable file that can be pre-processed into Main.hs, like Main.hsc for example.

Changed 5 years ago by duncan

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.