HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
439 stars 77 forks source link

Build fails with ghc 7.8 #82

Closed stulli closed 10 years ago

stulli commented 10 years ago

template-haskell < 2.9 is needed, but 2.8.x cannot be built on ghc 7.8.x. aeson-0.6.x has the same problem (also see issue #77).

aeson-0.6.2.1 depends on template-haskell-2.8.0.0 which failed to install.
threepenny-gui-0.4.1.0 depends on template-haskell-2.8.0.0 which failed to install.
HeinrichApfelmus commented 10 years ago

I have updated the dependencies in the latest master branch. I can't test them, though, because I don't have GHC 7.8 installed. Could you install the package from source and tell me whether that works?

stulli commented 10 years ago

Worked without problems, thanks for the quick fix!

I installed with ghc 7.8.2 in a fresh cabal sandbox via cabal sandbox add-source.

HeinrichApfelmus commented 10 years ago

Great! I take it that the examples in the samples folder work as well?

stulli commented 10 years ago

Hm, my toy example worked. But looking at the samples it doesn't look so good: bartab, buttons, chat, crud, dragndrop, missing-dollars: server starts but nothing is shown on localhost except the background currencyconverter: input fields are displayed but don't update drummachine: widgets appear but no music (I suppose there should be music when ticking the boxes?)

If there is anything I can do to help you fixing that let me know.

HeinrichApfelmus commented 10 years ago

CurrencyConverter is definitely a problem with Data.Aeson.Generic. I'll look into backporting the relevant patches from the develop branch.

For the others, it may be a path issue, but chances are that there is an aeson problem as well.

HeinrichApfelmus commented 10 years ago

I have backported the relevant changes in the latest commit to the master branch. Could you check the examples again?

I recommend that you use the helper scripts in the samples folder

 cd samples
 ./runhaskell CurrencyConverter.hs

Note that you may have to set up a cabal sandbox.

cd threepenny-gui
cabal sandbox init
cabal configure -fbuildExamples
cabal install --only-dependencies

This should do the trick.

stulli commented 10 years ago

CurrencyConverter and DrumMachine now work as expected. Will test the other examples these days.

stulli commented 10 years ago

For VideoAnnotate I get this error:

VideoAnnotate/MediaPlayer.hs:25:18:
Not in scope: type constructor or class ‘Dom’

In MissingDollars the calculate button was broken for me. Replacing

result <- mapM readMay `liftM` getValuesList [hotelOut,hotelCost,hotelHold]
case result of
    Just [getout,getcost,gethold] -> updateDisplay getout getcost gethold
     _ -> return ()

with

result <- getValuesList [hotelOut,hotelCost,hotelHold]
case result of
    [getout,getcost,gethold] -> updateDisplay (read getout) (read getcost) (read gethold)
    _ -> return ()

worked though.

Everything else worked as expected as far as I can tell. Oh, and the source code links are broken (master/src/xy instead of master/samples/xy).

HeinrichApfelmus commented 10 years ago

Thanks a lot for checking all the examples!

stulli commented 10 years ago

After checking MissingDollars again everything is ok. Well, it was late yesterday so I probably just overlooked something (maybe put a non-digit into a field or sthg).

HeinrichApfelmus commented 10 years ago

Great, thanks a lot! I'm now going to upload the new release to hackage.