Haskell Graphics Library that works in GHCi on MacOS X

前端 未结 5 2031
滥情空心
滥情空心 2021-01-30 07:30

Does there exist a Haskell graphics library or binding to an external library that fulfills the following requirements:

  1. Can be used from ghci, i.e. I
5条回答
  •  面向向阳花
    2021-01-30 07:38

    As of early 2014, I wasn't able to use @heinrich-apfelmus answer in Mac OS X. This GLFW-b example (link) however worked.

    So, ensure you have:

    $ cabal install glfw-b
    

    and, if you tried Apfelmus' answer, you may need to

    $ ghc-pkg list
    $ ghc-pkg unregister GLFW-x.x.x.x
    

    as both provide Graphics.UI.GLFW, and you will get an "Ambiguous module name 'Graphics.UI.GLFW'" from ghc. Then I just tried the sample program above and it worked (Mac OS X, 10.9, Mavericks)

提交回复
热议问题