6

Can cabal use hsc2hs to create hs files? How?

I didn't find an answer in the manuals, googling, nor in other projects (had my hopes up for gtk2hs but it turns out that it doesn't use cabal)

yairchu
  • 23,680
  • 7
  • 69
  • 109

1 Answers1

11

Yes, cabal understands that when you list module Foo in your .cabal file, and it finds Foo.hsc on disk, that it must run hsc2hs on the module first.

Cabal transparently handles the existence of .hsc files.

Don Stewart
  • 137,316
  • 36
  • 365
  • 468
  • 1
    Out of curiosity, I dug through Cabal's history; it looks like `hsc2hs` has been supported since Cabal 0.4 or earlier... i.e. it's been around forever. – ephemient Jul 09 '09 at 19:37
  • Except for the #def directive, which leads to linker errors (https://github.com/haskell/cabal/issues/238) – John L Jun 21 '13 at 05:46