SDL.Cairo.Canvas 即使安装了最新版本的 SDL(0.6.6.0) 也找不到
SDL.Cairo.Canvas not found even if the newest version of SDL(0.6.6.0) has been installed
刚安装了最新版haskell绑定版SDL(0.6.6.0),虽然可以导入SDL.Cairo,但还是无法导入SDL.Cairo。Canvas:
Prelude> install SDL.Cairo.Canvas
<interactive>:1:9: error:
Not in scope: data constructor ‘SDL.Cairo.Canvas’
No module named ‘SDL.Cairo’ is imported.
Prelude> import SDL.Cairo.Canvas as Canvas
<no location info>: error:
Could not find module ‘SDL.Cairo.Canvas’
It is not a module in the current program, or in any known package.
那么,SDL.Cairo.Canvas是不是只能在旧版本中使用?还是安装不正确造成的?
SDL.Cairo.Canvas
不在 sdl2 包中。它在 sdl2-cairo 包的旧版本中(0.2 之前)。您可以使用 cabal 或 stack 或您用来安装软件包的任何其他方式安装它。
或者,可以在 cairo-canvas 中找到等效模块,如 Graphics.Rendering.Cairo.Canvas
。
刚安装了最新版haskell绑定版SDL(0.6.6.0),虽然可以导入SDL.Cairo,但还是无法导入SDL.Cairo。Canvas:
Prelude> install SDL.Cairo.Canvas
<interactive>:1:9: error:
Not in scope: data constructor ‘SDL.Cairo.Canvas’
No module named ‘SDL.Cairo’ is imported.
Prelude> import SDL.Cairo.Canvas as Canvas
<no location info>: error:
Could not find module ‘SDL.Cairo.Canvas’
It is not a module in the current program, or in any known package.
那么,SDL.Cairo.Canvas是不是只能在旧版本中使用?还是安装不正确造成的?
SDL.Cairo.Canvas
不在 sdl2 包中。它在 sdl2-cairo 包的旧版本中(0.2 之前)。您可以使用 cabal 或 stack 或您用来安装软件包的任何其他方式安装它。
或者,可以在 cairo-canvas 中找到等效模块,如 Graphics.Rendering.Cairo.Canvas
。