z0w0 / helm

A functionally reactive game engine, with headgear to protect you from the headache of game development provided.
http://helm-engine.org/
MIT License
600 stars 69 forks source link

Examples don't work #41

Closed chrisdotcode closed 10 years ago

chrisdotcode commented 10 years ago

The examples that are both on the site and the Readme are incorrect, unfortunately.

The error when compiling the follow is:

import FRP.Helm
import qualified FRP.Helm.Window as Window

render :: (Int, Int) -> Element
render (w, h) = collage w h [move (100, 100) $ filled red $ square 64]

main :: IO ()
main = run defaultConfig $ render <~ Window.dimensions
$ ghc --make helm.hs
[1 of 1] Compiling Main             ( helm.hs, helm.o )

helm.hs:8:12: Not in scope: `defaultConfig'

Whereas the example on haddock works.

z0w0 commented 10 years ago

The examples are based on the development version because I was planning on releasing it pretty quickly, but I got caught up in study. I would recommend installing directly from this repo.

chrisdotcode commented 10 years ago

Thanks a lot!

But at the same time, shouldn't the examples be updated likewise?

If there's too much on your plate, I can send a pull request, copying over the examples from the haddockumentation.

z0w0 commented 10 years ago

The examples in the haddock documentation are correct for 0.4. The version in development is 0.5. So the haddock documentation will be updated when 0.5 is released.

chrisdotcode commented 10 years ago

Ah, now I understand. Thanks!