我尝试卸载Haskell平台,但包数据库保持不变.如何从我的系统中彻底清除Haskell?
我写了以下函数:
(.>=.) :: 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) 我尝试使用“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)
有人可以帮忙吗?
是否有一个堆栈命令可以运行以获取我的系统上堆栈安装的所有LTS版本的列表?
在 Haskell Gloss 库中,我们使用 Picture 类型的 Text 构造函数来绘制文本。但是,如何找到这样一张图片的宽度(和高度)呢?
我想调用这个函数
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?
我试着编译以下内容:
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的任何想法?