How to set up cabal for ghc 7.10 on windows 64

I have just downloaded the newest GHC 7.10.1 version, and I am trying to set up the cabal system to make it work. But I couldn't find the 64-bit cabal binary for 64 bit windows. Haskell Platform does not have 7.10 yet. So I went to https://www.haskell.org/cabal/download.html , but there is only binary for 32-bit windows. I tried to use that version to cabal update , but cabal.exe just cr

如何在windows 64上为ghc 7.10设置cabal

我刚刚下载了最新的GHC 7.10.1版本,并且我正在设置cabal系统来使其工作。 但是我找不到64位窗口的64位cabal二进制文件。 Haskell平台还没有7.10。 所以我去了https://www.haskell.org/cabal/download.html,但只有32位窗口的二进制文件。 我试图使用该版本进行cabal update ,但cabal.exe在设置初始配置时刚刚崩溃。 我想知道为64位GHC设置cabal的步骤是什么? 这是对我有用的东西。 我使用64位GHC的先前版本(如Has

Differences in library building with using Cabal and GHC

I'd like to build library from Haskell code, and further use this library (shared library: dll or so) in my C++ project. I found simple tutorial: http://blogging.makesmeanerd.com/?p=367 And successfull repeat this example. Further, I simplify this example, and get next code: {-# LANGUAGE ForeignFunctionInterface #-} module Grep where import Foreign import Foreign.C.String import Data.C

使用Cabal和GHC建造图书馆的差异

我想从Haskell代码构建库,并进一步在我的C ++项目中使用这个库(共享库:dll左右)。 我发现简单的教程:http://blogging.makesmeanerd.com/?p=367并成功地重复这个例子。 此外,我简化了这个例子,并获得下一个代码: {-# LANGUAGE ForeignFunctionInterface #-} module Grep where import Foreign import Foreign.C.String import Data.Char printCString :: CString -> IO () printCString s = do ss <- pe

Has anyone successfully built a Cygwin version of GHC?

Has anyone successfully built a Cygwin version of GHC (since Haskell switched from using Cygwin to MinGW)? From the haskell website: "GHC targets MinGW, not Cygwin. It is in principle possible to build a version of GHC, GHC-cygwin, that targets Cygwin instead. The up-side of GHC-cygwin is that Haskell programs compiled by GHC-cygwin can import the (Haskell) Posix library. We do not suppo

有没有人成功构建了GHC的Cygwin版本?

有没有人成功构建了Cygwin版本的GHC(因为Haskell从使用Cygwin切换到MinGW)? 来自haskell网站: “GHC的目标是MinGW,而不是Cygwin,原则上可以构建一个GHC版本的GHC-cygwin,它的目标是Cygwin,GHC-cygwin的好处在于GHC-cygwin编译的Haskell程序可以导入( Haskell)Posix库,但是我们不支持GHC-cygwin,它超出了我们的资源。“ https://ghc.haskell.org/trac/ghc/wiki/Building/Platforms/Windows 我试着用Cygwin的conf

Dynamically loading compiled Haskell module

I'm trying to dynamically compile and load Haskell modules using GHC API. I understand the API fluctuates quite a bit from on one version to another so I'm specifically talking about GHC 7.6.*. I have tried running the same code on MacOS and Linux. In both cases the Plugin module compiles fine but gives the following error on load: Cannot add module Plugin to context: not interpreted

动态加载编译的Haskell模块

我正在尝试使用GHC API动态编译和加载Haskell模块。 我了解API在不同版本之间波动很大,所以我特别谈论GHC 7.6。*。 我曾尝试在MacOS和Linux上运行相同的代码。 在这两种情况下,插件模块都能很好地编译,但在加载时出现以下错误: Cannot add module Plugin to context: not interpreted 这个问题类似于这个模块只有在主机程序的同一个运行过程中编译才加载的问题。 -- Host.hs: compile with ghc-7.6.* -- $ ghc -packag

Reduce size of executable produced by GHC

Using GHC version 7.4.2 with flags like -O3, I still get huge executable produced. I understand that GHC does static linking, and dependencies of the binary looks like: linux-vdso.so.1 (0x00007fff49bff000) libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fe658d6c000) librt.so.1 => /usr/lib/librt.so.1 (0x00007fe658b64000) libutil.so.1 => /usr/lib/libutil.so.1 (0x00007fe6589

减少GHC生成的可执行文件的大小

使用带有-O3等标志的GHC版本7.4.2,我仍然获得巨大的可执行文件。 我知道GHC会进行静态链接,并且二进制文件的依赖关系如下所示: linux-vdso.so.1 (0x00007fff49bff000) libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fe658d6c000) librt.so.1 => /usr/lib/librt.so.1 (0x00007fe658b64000) libutil.so.1 => /usr/lib/libutil.so.1 (0x00007fe658961000) libdl.so.2 => /usr/lib/libdl.so.2

What is the current status of GHC on 64 bit Windows?

My current understanding is No 64-bit GHC, ticket #1884 The 32-bit GHC and the binaries it builds work just fine because the Windows OS loader converts OS calls and pointers to 64 bits. The same applies to DLLs No mixing 32 bit and 64 bit code (ie. your 32 bit Haskell DLL isn't going to be friends with the 64 bit program that wants to use it) Latest discussion is a thread started on

GHC在64位Windows上的现状是什么?

我目前的理解是 没有64位GHC,票#1884 32位的GHC及其构建的二进制文件工作得很好,因为Windows OS加载器将OS调用和指针转换为64位。 这同样适用于DLL 没有混合32位和64位代码(即你的32位Haskell DLL不会成为想要使用它的64位程序的朋友) 最新讨论是2011年5月开始的一个主题 它是否正确? 是否有任何需要注意的缺陷,特别是作为FFI用户? 例如,如果我要将某些Haskell代码作为32位DLL导出到某个Windows程序,我应

how to install a working haskell compiler on OSX?

I have downloaded the haskell platform 2013.2.OO 64 bit and installed it according to the guide on a OSX version 10.9.2 (where i used Xcode to install the gcc compiler). I get the ghci to work, but when i try to compile hello.hs (containing: main = putStrLn "Hello, World!") I get a lot of errors and missing files (for instance math.h, stint.h). I appreciate any help of what I have don

如何在OSX上安装工作的haskell编译器?

我已经下载了haskell平台2013.2.OO 64位,并根据OSX 10.9.2版本(我使用Xcode安装gcc编译器)的指南进行安装。 我得到了ghci的工作,但是当我尝试编译hello.hs(包含:main = putStrLn“Hello,World!”)时,我得到了很多错误和缺少的文件(例如math.h,stint.h)。 我感谢我所做错的任何帮助...... 您正在使用Xcode 5.Xcode5和GHC 7.6之间存在已知的兼容性问题。 请参阅Haskell Platform MacOS X页面,了解解决此问题的包

When is memoization automatic in GHC Haskell?

I can't figure out why m1 is apparently memoized while m2 is not in the following: m1 = ((filter odd [1..]) !!) m2 n = ((filter odd [1..]) !! n) m1 10000000 takes about 1.5 seconds on the first call, and a fraction of that on subsequent calls (presumably it caches the list), whereas m2 10000000 always takes the same amount of time (rebuilding the list with each call). Any idea wha

什么时候GHC Haskell自动记忆?

我无法弄清楚为什么m1显然被记忆,而m2不在以下内容中: m1 = ((filter odd [1..]) !!) m2 n = ((filter odd [1..]) !! n) m1 10000000在第一次调用时需要大约1.5秒,并且在后续调用中占用一部分时间(可能会缓存列表),而m2 10000000总是花费相同的时间量(每次调用重建列表)。 任何想法发生了什么? 关于GHC是否和何时将记忆功能,有没有什么经验法则? 谢谢。 GHC不会记忆功能。 但是,它确实在每次输入

Why is GHC so difficult to compile?

I'm trying to compile a recent version of GHC (say, 7.4 or 7.6) on Solaris, compiling using a 6.12.1 binary. However, I've noticed GHC requires an exact GCC version of 4.1.2 to compile itself, as well as many other requirements. Why are the prerequisites for building GHC so strict? Haskell is so powerful I can't imagine much that couldn't be written in pure Haskell, so why doe

为什么GHC很难编译?

我试图在Solaris上编译最新版本的GHC(例如7.4或7.6),使用6.12.1二进制编译。 但是,我注意到GHC需要4.1.2的精确GCC版本来编译自身,以及许多其他需求。 为什么建立GHC的先决条件如此严格? Haskell非常强大,我无法想象很多不能用纯Haskell编写的代码,那么为什么GHC需要一个C编译器来编译它自己呢? 有没有我可以用Haskell编译器编译的GHC版本? 请注意,我不需要它来生成高度优化的代码,即使只是让GHCi工作也没关系

Minimal haskell (ghc) program installation (deployment without ghc/cabal)

(My problem is about distribute binaries without haskell-platform, ghc, cabal, ...) I need deploy a well cabal formed haskell application (a Yesod scaffolded) but I have disk space restrictions. GHC size is about 1Gbytes, store all cabal source code, packages, etc... require more disk space, etc... Obviously, haskell-platform, ghc, ... is about development (not deployment). In my specific

最小的haskell(ghc)程序安装(没有ghc / cabal的部署)

(我的问题是关于分发没有haskell-platform,ghc,cabal等的二进制文件) 我需要部署一个良好的组合式haskell应用程序(一个Yesod脚手架),但我有磁盘空间限制。 GHC的大小约为1G,存储所有的cabal源代码,软件包等等......需要更多的磁盘空间等等...... 显然,haskell-platform,ghc ......是关于开发(而不是部署)的。 在我的具体情况下,我可以生成 cabal clean && cabal configure && cabal build