Ticket #245 (new defect)
Cabal should support hsc2hs's stub .c feature
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | _|_ |
| Component: | Cabal library | Version: | 1.2.3.0 |
| Severity: | normal | Keywords: | |
| Cc: | acowley@… | Difficulty: | normal |
| GHC Version: | 6.8.2 | Platform: |
Description
The Pugs project recently uncovered a bit of a problem with GHC 6.8.x.
To quote:
- {-# INCLUDE -} seems to require either a very relative or an absolute path. That is, you have to make the path listed inside an INCLUDE ('dist/build/Pugs/Embed/Parrot_hsc.h') in the file dist/build/Pugs/Embed/Parrot.hs absolute or completely relative - that is, the first line needs to look like either '{-# INCLUDE "Parrot_hsc.h" #-}' or '{-# INCLUDE
"/home/gwern/bin/pugs/dist/build/Pugs/Embed/Parrot_hsc.h" #-}'.
The particular problem is that 'dist/build/Pugs/Embed/Parrot_hsc.c:#include "Parrot_hsc.h"' is being translated to the (broken) 'dist/build/Pugs/Embed/Parrot.hs:{-# INCLUDE "dist/build/Pugs/Embed/Parrot_hsc.h" #-}'.
The relevant files and notes can be found in the Pugs SVN repo, in src/Pugs/Embed/, and the files of interest are Haskell.hs Parrot.hsc Parrot_hsc.c Parrot_hsc.h Perl5.hs Pugs.hs
-- gwern
