小编use*_*733的帖子

如何从Windows XP机器清除我的Haskell安装?

我尝试卸载Haskell平台,但包数据库保持不变.如何从我的系统中彻底清除Haskell?

haskell

10
推荐指数
2
解决办法
2589
查看次数

GHC拒绝ST monad代码无法统一类型​​变量?

我写了以下函数:

(.>=.) :: Num a => STRef s a -> a -> Bool
r .>=. x = runST $ do
 v <- readSTRef r
 return $ v >= x
Run Code Online (Sandbox Code Playgroud)

但是当我尝试编译时,我收到以下错误:

Could not deduce (s ~ s1)
from the context (Num a)
  bound by the type signature for
             .>=. :: Num a => STRef s a -> a -> Bool
  at test.hs:(27,1)-(29,16)
  `s' is a rigid type variable bound by
      the type signature for .>=. :: Num a => STRef s …
Run Code Online (Sandbox Code Playgroud)

variables haskell types unification ghc

7
推荐指数
2
解决办法
269
查看次数

wx 0.90.0.1 无法在 Haskell Platform 2012.2.0.0 (WinXP) 上安装

我尝试使用“cabal install wx”在 Haskell Platform 2012.2.0.0 上安装 WX 0.90.0.1,但得到以下结果:

Configuring wxc-0.90.0.4...
setup.exe: wx-config: does not exist
cabal: Error: some packages failed to install:
wx-0.90.0.1 depends on wxc-0.90.0.4 which failed to install.
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install.
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

wxwidgets haskell

5
推荐指数
1
解决办法
1076
查看次数

堆栈安装的LTS版本

是否有一个堆栈命令可以运行以获取我的系统上堆栈安装的所有LTS版本的列表?

haskell package-managers haskell-stack

5
推荐指数
1
解决办法
281
查看次数

如何找到光泽文本图片的宽度?

在 Haskell Gloss 库中,我们使用 Picture 类型的 Text 构造函数来绘制文本。但是,如何找到这样一张图片的宽度(和高度)呢?

haskell gloss

5
推荐指数
1
解决办法
1127
查看次数

如何将Haskell字符串转换为Ptr(Ptr GLchar)?

我想调用这个函数

glShaderSource ::
 GLuint
 -> GLsizei
 -> GHC.Ptr.Ptr (GHC.Ptr.Ptr GLchar)
 -> GHC.Ptr.Ptr GLint
 -> IO ()
Run Code Online (Sandbox Code Playgroud)

第三个参数是着色器程序,它是我程序中的Haskell字符串.如何将Haskell String转换为GHC.Ptr.Ptr (GHC.Ptr.Ptr GLchar)可以调用的glShaderSource

opengl haskell ffi

2
推荐指数
1
解决办法
658
查看次数

在Yesod处理程序中使用Data.Binary.decodeFile

我试着编译以下内容:

postRQuery :: Handler RepHtml
postRQuery = do
 properties <- liftIO $ decodeFile "store" :: IO (Map String ())
 defaultLayout [whamlet|Posted!|]
Run Code Online (Sandbox Code Playgroud)

但是我得到了以下编译器错误:

Couldn't match expected type `GGHandler
                              Bayith
                              Bayith
                              (Data.Enumerator.Iteratee
                               Data.ByteString.Internal.ByteString IO)
                              t0'
        with actual type `IO (Map String ())'
In a stmt of a 'do' expression:
    properties <- liftIO $ decodeFile "store" :: IO (Map String ())
Run Code Online (Sandbox Code Playgroud)

关于如何在Yesod处理程序中使用Data.Binary.decodeFile的任何想法?

haskell yesod

0
推荐指数
1
解决办法
218
查看次数