Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell ByteString.Lazy.Char8(空间不足)_Haskell_Lazy Evaluation_Bytestring - Fatal编程技术网

Haskell ByteString.Lazy.Char8(空间不足)

Haskell ByteString.Lazy.Char8(空间不足),haskell,lazy-evaluation,bytestring,Haskell,Lazy Evaluation,Bytestring,此代码执行后立即出现:hGetBufSome:resource expensed(空间不足)错误 import qualified Data.ByteString.Lazy.Char8 as B8 main = do (l:_) <- B8.lines `fmap` B8.getContents B8.putStrLn l 将限定数据.ByteString.Lazy.Char8导入为B8 main=do (l:)64位Windows 7上的lazy ByTestring似

此代码执行后立即出现
:hGetBufSome:resource expensed(空间不足)
错误

import qualified Data.ByteString.Lazy.Char8 as B8
main = do
    (l:_) <- B8.lines `fmap` B8.getContents
    B8.putStrLn l
将限定数据.ByteString.Lazy.Char8导入为B8
main=do

(l:)64位Windows 7上的lazy ByTestring似乎存在问题,例如


由于这些报告都是一年前的,如果您还没有使用GHC 7.8.3(例如,来自Haskell平台2014.2.0.0),我会尝试使用该版本。

以下是针对GHC的关于此问题的错误报告:


我想现在的解决方案是不要在lazy ByTestRing上使用getContents(切换到strict或只是增量读取)。

您运行的是什么版本的GHC和操作系统?您的GHC是32位还是64位?Windows 7 x64,GCH 64位我应该切换到32位版本吗?哦****,我只是花了几个小时试图弄明白,假设这是我的错,因为我是新手。是的,我会试试。您正在使用Haskell平台吗?是的,Haskell平台-2014.2.0.0-x86_64