Cabal and c2hs

Isaac Jones ijones at syntaxpolice.org
Mon May 2 01:59:49 EDT 2005


Dominic Steinitz <dominic.steinitz at blueyonder.co.uk> writes:

(snip)
>> > BTW I discovered a bug in the .chs handler. You have "-o " rather than
>> > "-o". I can try and send a patch but it might be easier if you edit the
>> > file yourself.
>>
>> Does "-o " not work?  According to the help output, it's correct:
>
> I don't understand why but it produced a file called " IP_ICMP.hs". If you run 
> it at the command line
>
> c2hs -o IP_ICMP.hs ip_icmp.h  IP_ICMP.chs
>
> then you get "IP_ICMP.hs" as required. Perhaps something is taking the extra 
> space to be part of the filename?

Ahh, this is because I passed them as a single argument.  I switched
it to multiple arguments which should fix it.

ie this:

>> > myPpC2hs inFile outFile verbose
>> >     = rawSystemPath verbose "c2hs" ["-o" ++ outFile, "ip_icmp.h", inFile]

Is now this:

>> > myPpC2hs inFile outFile verbose
>> >     = rawSystemPath verbose "c2hs" ["-o", outFile, "ip_icmp.h", inFile]

Can you try that out in your hook and see if it works?

peace,

  isaac


More information about the Libraries mailing list