qfpl / reflex-tutorial

29 stars 11 forks source link

Need help to run the exercises #19

Closed jafonsor closed 5 years ago

jafonsor commented 5 years ago

I've already installed nix and run nix-shell on the exercises directory. Then I ran ./ex00.sh and tried to open the http://localhost:8080 but there is no socket opened on that port.

I'm new to cabal and nix so couldn't figure out the problem on my own. I would be very gratefull if anyone could help me trouble shoot the problem.

Here is a listing of executing the script:

[nix-shell:~/progs/reflex/reflex-tutorial/code/exercises]$ ./ex00.sh 
Loading ghci -ghci-script=ex00.ghci ...
GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help
[1 of 6] Compiling Ex00.Common      ( src/Ex00/Common.hs, interpreted )
[2 of 6] Compiling Util.Reflex      ( src/Util/Reflex.hs, interpreted )
[3 of 6] Compiling Util.Bootstrap   ( src/Util/Bootstrap.hs, interpreted )
[4 of 6] Compiling Ex00.Run         ( src/Ex00/Run.hs, interpreted )
[5 of 6] Compiling Util.Run         ( src/Util/Run.hs, interpreted )

src/Util/Run.hs:61:3: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘MonadWidget t m’ matches an instance declaration
      instance Reflex.Dom.Old.MonadWidgetConstraints t m =>
               MonadWidget t m
        -- Defined in ‘Reflex.Dom.Old’
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the type signature:
        headSection :: MonadWidget t m => FilePath -> [FilePath] -> m ()
   |
61 |   MonadWidget t m =>
   |   ^^^^^^^^^^^^^^^^^^...
[6 of 6] Compiling Ex00.Exercise    ( src/Ex00/Exercise.hs, interpreted )
Ok, six modules loaded.
Loaded GHCi configuration from ex00.ghci

src/Util/Run.hs:61:3: warning: [-Wsimplifiable-class-constraints]
    • The constraint ‘MonadWidget t m’ matches an instance declaration
      instance Reflex.Dom.Old.MonadWidgetConstraints t m =>
               MonadWidget t m
        -- Defined in ‘Reflex.Dom.Old’
      This makes type inference for inner bindings fragile;
        either use MonoLocalBinds, or simplify it using the instance
    • In the type signature:
        headSection :: MonadWidget t m => FilePath -> [FilePath] -> m ()
   |
61 |   MonadWidget t m =>
   |   ^^^^^^^^^^^^^^^^^^...
Running test...

...done
dalaing commented 5 years ago

That is on my list of things to fix already - I need to update the tutorial so that it refers to port 9090. After that you should be good, sorry for the confusion.

alexfmpe commented 5 years ago

@jafonsor You seem familiar. Didn't we meet in https://github.com/ist-dsi ?

jafonsor commented 5 years ago

Hi, @alexfmpe. Yes we did meet at IST DSI.

jafonsor commented 5 years ago

@dalaing thanks for the help. Is there a way for the tool used for the hot reload (jsaddle, isn't it?) to log the port were the server is running?

dalaing commented 5 years ago

I could probably add something like that - for the moment I've just updated the website (and also folded in some related feedback from a colleague who ran through the tutorial recently). You might need to do a hard reload to see the changes.

jafonsor commented 5 years ago

Thanks :+1: