GHC: Ticket Queryhttp://ghc.haskell.org/trac/ghc/query?status=closed&component=hsc2hs&milestone=6.12.3&group=resolution&order=priority
The Glasgow Haskell Compileren-USGHChttp://ghc.haskell.org/trac/ghc/chrome/site/ghc_logo.pnghttp://ghc.haskell.org/trac/ghc/query?status=closed&component=hsc2hs&milestone=6.12.3&group=resolution&order=priority
Trac 1.0.1http://ghc.haskell.org/trac/ghc/ticket/4014
http://ghc.haskell.org/trac/ghc/ticket/4014#4014: hsc2hs cannot open custom template fileMon, 26 Apr 2010 02:42:25 GMTgolubovsky<p>
Note: this happens to hsc2hs which comes with binary ghc-6.12.2.
</p>
<p>
hsc2hs from darcs.haskell.org seems to not have this issue
</p>
<p>
When invoking hsc2hs like this:
</p>
<p>
hsc2hs -t /dev/null HS_GLFW_H.hsc
</p>
<p>
(or any other filename with -t, the hsc file has its own template), the output follows:
</p>
<p>
hsc2hs: : openBinaryFile: does not exist (No such file or directory)
</p>
<p>
Note the second colon: filename should be there, and it is empty.
</p>
<p>
strace log shows that there is an attempt to open a file with empty name (ca. line 534):
</p>
<p>
open("", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT (No such file or directory)
</p>
Resultshttp://ghc.haskell.org/trac/ghc/ticket/4014#changelog