Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hsc2hs preprocessor #6

Closed
mboes opened this issue Nov 21, 2017 · 1 comment
Closed

Support hsc2hs preprocessor #6

mboes opened this issue Nov 21, 2017 · 1 comment

Comments

@mboes
Copy link
Member

mboes commented Nov 21, 2017

Not all source files can be handed over to as-is to GHC. hsc2hs is one such preprocessor that needs to be called by hand. Cabal in fact defines a number of such hard-coded preprocessors: happy and alex among them. I'm not too worried about those, which are easy for the user to special-case using a genrule. But hsc2hs is a tad tricky.

It sometimes creates multiple output files, sometimes not. At most, these output files are (given an input file A.hsc): A.hs, A_hsc.h, A_hsc.c. Other complications include the fact that the same -I and possibly even -L and -l compiler switches than for ghc need to be passed to hsc2hs as well.

We need a rule of the following form:

haskell_hsc(
  name = "foo",
  src = "Foo.hsc",
)
@mboes
Copy link
Member Author

mboes commented Dec 18, 2017

Fixed as a byproduct of #14.

@mboes mboes closed this as completed Dec 18, 2017
Profpatsch pushed a commit that referenced this issue Mar 7, 2019
Added examples of commands to the readme in the project root.
Profpatsch pushed a commit that referenced this issue Mar 7, 2019
Something changed in its CI environment and now several things don't work
anymore.

- Pin the docker image tag and the nixpkgs revision.  (Not sure if that was
  actually the cause of the breakage; things didn't change afterwards.)
- "Brace expansions" aren't working.  Take the opportunity to
  move our list of "golden" packages to a separate file.
- The network package doesn't build anymore.  Temporarily remove it from
  that list.
Profpatsch pushed a commit that referenced this issue Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant