Closed parsonsmatt closed 9 years ago
It recompiles for me, as seen here:
$ wai-devel -p app/Main.hs -f main
Starting devel application at http://localhost:3000
UpdateStatusRequiredRestart
UpdateStatusProgress [1 of 2] Compiling Exec
UpdateStatusProgress [2 of 2] Compiling Main
UpdateStatusDone
Warning: app/Main.hs@18:28-18:32 Defaulting the following constraint(s) to type ‘Integer’
(Integral a0)
arising from a use of ‘asdf’
at /home/urbanslug/src/haskell/wai-devel-repro/app/Main.hs:18:28-31
(Read a0)
arising from a use of ‘read’
at /home/urbanslug/src/haskell/wai-devel-repro/app/Main.hs:18:35-38
(Show a0)
arising from a use of ‘show’
at /home/urbanslug/src/haskell/wai-devel-repro/app/Main.hs:18:21-24
In the first argument of ‘(.)’, namely ‘asdf’
In the second argument of ‘(.)’, namely ‘asdf . read’
In the second argument of ‘(.)’, namely ‘show . asdf . read’
Setting phasers to stun... (port 1234) (ctrl-c to quit)
Rebuilding...
UpdateStatusProgress [2 of 2] Compiling Main
UpdateStatusDone
Warning: app/Main.hs@18:28-18:32 Defaulting the following constraint(s) to type ‘Integer’
(Integral a0)
arising from a use of ‘asdf’
at /home/urbanslug/src/haskell/wai-devel-repro/app/Main.hs:18:28-31
(Read a0)
arising from a use of ‘read’
at /home/urbanslug/src/haskell/wai-devel-repro/app/Main.hs:18:35-38
(Show a0)
arising from a use of ‘show’
at /home/urbanslug/src/haskell/wai-devel-repro/app/Main.hs:18:21-24
In the first argument of ‘(.)’, namely ‘asdf’
In the second argument of ‘(.)’, namely ‘asdf . read’
In the second argument of ‘(.)’, namely ‘show . asdf . read’
Setting phasers to stun... (port 1234) (ctrl-c to quit)
Are you still experiencing this?
Since you said the recompilation is almost instantaneous I shall close this issue now.
@urbanslug I have the same issue with the following code: https://github.com/gasi/zoomhub/pull/1/files
When I run wai-devel --path ./Main.hs --function main
, I get this:
> wai-devel --path ./Main.hs --function main
Starting devel application at http://localhost:3000
UpdateStatusRequiredRestart
UpdateStatusProgress [1 of 5] Compiling ZoomHub.Types.DeepZoomImage
UpdateStatusProgress [2 of 5] Compiling ZoomHub.Types.Content
UpdateStatusProgress [3 of 5] Compiling ZoomHub.Rackspace.CloudFiles
UpdateStatusProgress [4 of 5] Compiling ZoomHub.API
UpdateStatusProgress [5 of 5] Compiling Main
UpdateStatusDone
…but it doesn’t rebuild the project when modifying and saving Main.hs
. Is this related to me using Warp/Servant: https://github.com/gasi/zoomhub/pull/1/files#diff-98a3ddc5c474fd14c4ee9401c03197a1R34?
Thanks for your help.
For a reproduction, clone this repository with branch only-executable.
stack build
works finewai-devel -p app/Main.hs -f main
compiles and starts the app...app/Main.hs
is changed.