on master help sign in
Add devel to improve ob run error messages
commit15b5aebcd333ec250db29763b24816a00bcaf30f authorTom Smalley <tfsmalley@gmail.com> dateFri 25 May 2018, 13:42 (8 years ago) parentc14b3e3
2 files changed+12−3
lib/command/src/Obelisk/Command/Run.hs+2−3 skeleton/devel/Devel.hs+10
lib/command/src/Obelisk/Command/Run.hs+2−3
@@ -35,7 +35,7 @@ run = do
3535 pkgs <- getLocalPkgs
3636 withGhciScript pkgs $ \dotGhciPath -> do
3737 freePort <- getFreePort
38− runGhcid dotGhciPath $ Just $ unwords ["Obelisk.Run.run", show freePort, "backend", "frontend"]
38+ runGhcid dotGhciPath $ Just $ unwords ["main", show freePort]
3939
4040runRepl :: MonadObelisk m => m ()
4141runRepl = do
@@ -89,8 +89,7 @@ withGhciScript pkgs f = do
8989
9090 let dotGhci = unlines
9191 [ ":set -i" <> intercalate ":" (mconcat hsSrcDirs)
92− , ":add Backend Frontend"
93− , ":module + Obelisk.Run Frontend Backend"
92+ , ":load ./devel/Devel.hs" -- TODO more robust filepath
9493 ]
9594 withSystemTempDirectory "ob-ghci" $ \fp -> do
9695 let dotGhciPath = fp </> ".ghci"
skeleton/devel/Devel.hsnew file+10
@@ -0,0 +1,10 @@
1+module Devel where
2+
3+import Obelisk.Run
4+
5+import Backend
6+import Frontend
7+
8+main :: Int -> IO ()
9+main port = run port backend frontend
10+