-2
关于在Haskell中编写函数,使用Gtk(通过包Gtk2Hs);这里是我的要求:使用效率错误
的功能应该有签名:
affiche :: ((Double,Double), (Double,Double)) -> IO Bool
的参数说明(A0,A),(B0,B);该函数应该使用一个名为mandelbrot的外部函数:如果mandelbrot(a,b)为true,那么必须有一个调用:postGUIAsync affiche2 a0 b0,其中affiche2是(我也介绍了我的尝试编写affiche):
affiche2 :: Double -> Double -> Render() affiche2 a b = do C.rectangle a b 1 1 stroke affiche :: ((Double,Double), (Double,Double)) -> IO Bool affiche ((a0,a), (b0,b)) = when (mandelbrot a b) $ affiche2 a0 b0
我尝试写网站公告不使用postGUIAsync,并引发错误:
Error: Couldn't match type ‘Render’ with ‘IO’
Expected type: IO Bool
Actual type: Render()
你好,谢谢,我没有更多的编译错误,但没有任何显示在窗口中。请看看我的新问题(我现在正在写) – lolveley