@@ -43,19 +43,11 @@ run = do
4343 when (not (null pkgDirErrs)) $
4444 putLog Warning $ T.pack $ "Failed to find pkgs in " <> intercalate ", " pkgDirErrs
4545 let dotGhci = unlines
46− [ ":set args --quiet --port " <> show freePort
47− , ":set -i" <> intercalate ":" (mconcat hsSrcDirs)
48− , ":set -XScopedTypeVariables"
46+ [ ":set -i" <> intercalate ":" (mconcat hsSrcDirs)
4947 , ":add Backend Frontend"
50− , ":module + System.IO Control.Exception Control.Concurrent Obelisk.Run Frontend Backend"
51− ]
52− testCmd = unlines
53− [ "let handleBackendErr (_ :: SomeException) = hPutStrLn stderr \"backend stopped; make a change to your code to reload\""
54− , "backendTid <- forkIO $ handle handleBackendErr backend"
55− , "let conf = defRunConfig { _runConfig_redirectPort = " <> show freePort <> "}"
56− , "runWidget conf frontend"
57− , "killThread backendTid"
48+ , ":module + Obelisk.Run Frontend Backend"
5849 ]
50+ testCmd = unwords ["Obelisk.Run.run", show freePort , "backend", "frontend"]
5951 withSystemTempDirectory "ob-ghci" $ \fp -> do
6052 let dotGhciPath = fp </> ".ghci"
6153 liftIO $ do