c2hs

Using c2hs on Windows

人走茶凉 提交于 2019-12-24 03:26:42
问题 I'm trying to use the libxml-enumerator package on Windows, which (ultimately) needs to use c2hs. When trying to build the relevant package, I get the seemingly infamous "does not exist" error from c2hs. This seems to be related to not having GCC installed, but this seems a list strange, since I've added Haskell's copy of gcc.exe to my path. Does anyone know how to defeat this bug? 回答1: Turns out the answer is to install MinGW by itself and not rely on the MinGW included with GHC. Hope this

Cabal install gtk failing

China☆狼群 提交于 2019-12-23 06:48:56
问题 I'm trying to install gtk via cabal, however, I'm getting the following type errors when building it [ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug ( dist/build/Graphics/UI/Gtk/Embedding/Plug.hs, dist/build/Graphics/UI/Gtk/Embedding/Plug.o ) Graphics/UI/Gtk/Embedding/Plug.chs:120:6: error: Couldn't match expected type ‘Ptr ()’ with actual type ‘Maybe DrawWindow’ In the first argument of ‘gtk_plug_new’, namely ‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’ In the second

Difference between hsc2hs and c2hs?

假如想象 提交于 2019-12-18 10:52:52
问题 What is the difference between hsc2hs and c2hs? I know what hsc2hs is a preprocessor but what does it exactly do? And c2hs can make Haskell modules from C-code, but do I need hsc2hs for this? 回答1: They both have the same function: make it easier to write FFI bindings. You don't need to know about hsc2hs if you chose to use c2hs; they are independent. C2hs is more powerful, but also more complicated: Edward Z. Yang illustrates this point with a nice diagram in his c2hs tutorial: When should I

c2hs not getting installed / registered correctly

谁说我不能喝 提交于 2019-12-07 16:36:08
问题 When I run cabal install c2hs , it seems to finish correctly, but doesn't register the package. The package seems as if it's not even installed: it doesn't show up in ghc-pkg list , and rerunning cabal install c2hs goes through the same install procedure, instead of saying "All the requested packages are already installed". I'd much appreciate any help getting this up and running. I'm using the prebuilt GHC 7.4.1 binary. cabal install output: http://pastebin.com/CRUii8mm imports are defunct:

Difference between hsc2hs and c2hs?

删除回忆录丶 提交于 2019-11-30 00:07:06
What is the difference between hsc2hs and c2hs? I know what hsc2hs is a preprocessor but what does it exactly do? And c2hs can make Haskell modules from C-code, but do I need hsc2hs for this? They both have the same function: make it easier to write FFI bindings. You don't need to know about hsc2hs if you chose to use c2hs; they are independent. C2hs is more powerful, but also more complicated: Edward Z. Yang illustrates this point with a nice diagram in his c2hs tutorial : When should I use c2hs? There are many Haskell pre-processors; which one should you use? A short (and somewhat inaccurate