Hey everyone, What's the way to build a cabalized package with jhc? I tried the following:
hc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc 0.7.3 (-n 0.7.2-40 ) Creating library from description file: "Yampa.cabal" Reading: "Yampa.cabal" Finding Dependencies... Using Ho Cache: '/Users/chris/.jhc/cache' Typechecking... Compiling... Writing Library: Yampa-0.9.2.3.hl
But I don't think jhc actually compiled something, or it was *really* fast. I tried copying that .hl file to my JHC_LIBRARY_PATH, but when I invoke JHC with "-pyampa" it still won't find it. I'm a bit lost... -chris
Jhc (in this regard it is just like ghc, in fact) accepts only a very
simple format similar to the cabal files. Ghc introduced this file
format first, and jhc works fine (I think) with just about any file
produced for ghc, but not with the newer cabal stuff (that ghc will
also barf on). That said, it sounds quite likely that your build
worked.
What do you get with jhc --list-libraries and jhc --list-libraries --verbose?
David
On Mon, Nov 16, 2009 at 3:33 PM, Chris Eidhof
Hey everyone,
What's the way to build a cabalized package with jhc? I tried the following:
hc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc 0.7.3 (-n 0.7.2-40 ) Creating library from description file: "Yampa.cabal" Reading: "Yampa.cabal" Finding Dependencies... Using Ho Cache: '/Users/chris/.jhc/cache' Typechecking... Compiling... Writing Library: Yampa-0.9.2.3.hl
But I don't think jhc actually compiled something, or it was *really* fast. I tried copying that .hl file to my JHC_LIBRARY_PATH, but when I invoke JHC with "-pyampa" it still won't find it. I'm a bit lost...
-chris
Hi, Thanks David. --list-libraries does include the Yampa package, but the verbose option doesn't show any exported modules. So the next question: how can I convince JHC to compile the exposed-modules in that cabal file? -chris On 16 nov 2009, at 21:40, David Roundy wrote:
Jhc (in this regard it is just like ghc, in fact) accepts only a very simple format similar to the cabal files. Ghc introduced this file format first, and jhc works fine (I think) with just about any file produced for ghc, but not with the newer cabal stuff (that ghc will also barf on). That said, it sounds quite likely that your build worked.
What do you get with jhc --list-libraries and jhc --list-libraries -- verbose?
David
On Mon, Nov 16, 2009 at 3:33 PM, Chris Eidhof
wrote: Hey everyone,
What's the way to build a cabalized package with jhc? I tried the following:
hc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc 0.7.3 (-n 0.7.2-40 ) Creating library from description file: "Yampa.cabal" Reading: "Yampa.cabal" Finding Dependencies... Using Ho Cache: '/Users/chris/.jhc/cache' Typechecking... Compiling... Writing Library: Yampa-0.9.2.3.hl
But I don't think jhc actually compiled something, or it was *really* fast. I tried copying that .hl file to my JHC_LIBRARY_PATH, but when I invoke JHC with "-pyampa" it still won't find it. I'm a bit lost...
-chris
What does the cabal file look like?
David
On Mon, Nov 16, 2009 at 4:06 PM, Chris Eidhof
Hi,
Thanks David.
--list-libraries does include the Yampa package, but the verbose option doesn't show any exported modules. So the next question: how can I convince JHC to compile the exposed-modules in that cabal file?
-chris
On 16 nov 2009, at 21:40, David Roundy wrote:
Jhc (in this regard it is just like ghc, in fact) accepts only a very simple format similar to the cabal files. Ghc introduced this file format first, and jhc works fine (I think) with just about any file produced for ghc, but not with the newer cabal stuff (that ghc will also barf on). That said, it sounds quite likely that your build worked.
What do you get with jhc --list-libraries and jhc --list-libraries --verbose?
David
On Mon, Nov 16, 2009 at 3:33 PM, Chris Eidhof
wrote: Hey everyone,
What's the way to build a cabalized package with jhc? I tried the following:
hc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc --build-hl Yampa.cabal yampa-0.9.2.3.hl jhc 0.7.3 (-n 0.7.2-40 ) Creating library from description file: "Yampa.cabal" Reading: "Yampa.cabal" Finding Dependencies... Using Ho Cache: '/Users/chris/.jhc/cache' Typechecking... Compiling... Writing Library: Yampa-0.9.2.3.hl
But I don't think jhc actually compiled something, or it was *really* fast. I tried copying that .hl file to my JHC_LIBRARY_PATH, but when I invoke JHC with "-pyampa" it still won't find it. I'm a bit lost...
-chris
-- David Roundy
On Mon, 16 Nov 2009, Chris Eidhof wrote:
--list-libraries does include the Yampa package, but the verbose option doesn't show any exported modules. So the next question: how can I convince JHC to compile the exposed-modules in that cabal file?
This clearly means that JHC has not compiled your modules but just created an empty package. I suggest using Cabal from Darcs HEAD. It creates the necessary JHC-package-file for you. If you are using JHC from darcs, then you might still apply the following changes to Cabal in order to process the new --list-libraries format: cabal$ darcs whatsnew ./Distribution/Simple/JHC.hs What's new in "Distribution/Simple/JHC.hs": { hunk ./Distribution/Simple/JHC.hs 113 + ,(Rank2Types , "") hunk ./Distribution/Simple/JHC.hs 136 + (skipSpaces >> string "- " >> skipSpaces >> parse) ln) +{- + pCheck (readP_to_S hunk ./Distribution/Simple/JHC.hs 140 +-} }
Thanks, I'll try that! -chris On 17 nov 2009, at 12:15, Henning Thielemann wrote:
On Mon, 16 Nov 2009, Chris Eidhof wrote:
--list-libraries does include the Yampa package, but the verbose option doesn't show any exported modules. So the next question: how can I convince JHC to compile the exposed-modules in that cabal file?
This clearly means that JHC has not compiled your modules but just created an empty package. I suggest using Cabal from Darcs HEAD. It creates the necessary JHC-package-file for you. If you are using JHC from darcs, then you might still apply the following changes to Cabal in order to process the new --list-libraries format:
cabal$ darcs whatsnew ./Distribution/Simple/JHC.hs What's new in "Distribution/Simple/JHC.hs":
{ hunk ./Distribution/Simple/JHC.hs 113 + ,(Rank2Types , "") hunk ./Distribution/Simple/JHC.hs 136 + (skipSpaces >> string "- " >> skipSpaces >> parse) ln) +{- + pCheck (readP_to_S hunk ./Distribution/Simple/JHC.hs 140 +-} }
On Mon, 16 Nov 2009, David Roundy wrote:
Jhc (in this regard it is just like ghc, in fact) accepts only a very simple format similar to the cabal files. Ghc introduced this file format first, and jhc works fine (I think) with just about any file produced for ghc, but not with the newer cabal stuff (that ghc will also barf on).
That matches my experience.
That said, it sounds quite likely that your build worked.
I cannot follow this conclusion ... but if --list-libraries shows Yampa, it must have worked. I submitted some patches to cabal-devel to make Cabal and cabal-install work with JHC-0.7.2. I also made some modifications with respect to the changed --list-libraries format in JHC-0.7.3, but did not submit them as patch to cabal-devel, since JHC-0.7.3 is not yet released.
participants (3)
-
Chris Eidhof -
David Roundy -
Henning Thielemann