on master help sign in
Remove 'ob watch'
commit7d0c40be63619ad0b01020927a4b68263b1daf3f authorSridhar Ratnakumar <srid@srid.ca> dateTue 22 May 2018, 11:10 (8 years ago) parente79725a
3 files changed−19
lib/command/obelisk-command.cabal−1 lib/command/src/Obelisk/Command.hs−4 lib/command/src/Obelisk/Command/Repl.hs−14
lib/command/obelisk-command.cabal−1
@@ -48,7 +48,6 @@ library
4848 Obelisk.Command.Deploy
4949 Obelisk.Command.Nix
5050 Obelisk.Command.Project
51− Obelisk.Command.Repl
5251 Obelisk.Command.Run
5352 Obelisk.Command.Thunk
5453 Obelisk.Command.Utils
lib/command/src/Obelisk/Command.hs−4
@@ -32,7 +32,6 @@ import Obelisk.App
3232import Obelisk.CLI (Severity (..), cliDemo, failWith, getLogLevel, newLoggingConfig, putLog)
3333import Obelisk.Command.Deploy
3434import Obelisk.Command.Project
35−import Obelisk.Command.Repl (watch)
3635import Obelisk.Command.Run
3736import Obelisk.Command.Thunk
3837
@@ -82,7 +81,6 @@ data ObCommand
8281 | ObCommand_Run
8382 | ObCommand_Thunk ThunkCommand
8483 | ObCommand_Repl
85− | ObCommand_Watch FilePath
8684 | ObCommand_Internal ObInternal
8785 deriving Show
8886
@@ -115,7 +113,6 @@ obCommand = hsubparser
115113 , command "run" $ info (pure ObCommand_Run) $ progDesc "Run current project in development mode"
116114 , command "thunk" $ info (ObCommand_Thunk <$> thunkCommand) $ progDesc "Manipulate thunk directories"
117115 , command "repl" $ info (pure ObCommand_Repl) $ progDesc "Open an interactive interpreter"
118− , command "watch" $ info (ObCommand_Watch <$> strArgument (action "directory"))$ progDesc "Watch directory for changes and update interactive interpreter"
119116 ])
120117 <|> subparser
121118 (mconcat
@@ -308,7 +305,6 @@ ob = \case
308305 ThunkCommand_Unpack thunks -> mapM_ unpackThunk thunks
309306 ThunkCommand_Pack thunks -> forM_ thunks $ \(ThunkPackOpts dir upstream) -> packThunk dir (T.pack upstream)
310307 ObCommand_Repl -> runRepl
311− ObCommand_Watch component -> watch component
312308 ObCommand_Internal icmd -> case icmd of
313309 ObInternal_RunStaticIO k -> liftIO (unsafeLookupStaticPtr @(ObeliskT IO ()) k) >>= \case
314310 Nothing -> failWith $ "ObInternal_RunStaticIO: no such StaticKey: " <> T.pack (show k)
lib/command/src/Obelisk/Command/Repl.hsdeleted−14
@@ -1,14 +0,0 @@
1−{-# LANGUAGE FlexibleContexts #-}
2−{-# LANGUAGE OverloadedStrings #-}
3−module Obelisk.Command.Repl
4− ( watch
5− ) where
6−
7−import Data.Monoid ((<>))
8−
9−import Obelisk.App (MonadObelisk)
10−import Obelisk.Command.Project
11−
12−-- | Watch the given directory for errors and warnings
13−watch :: MonadObelisk m => FilePath -> m ()
14−watch dir = inProjectShell "ghc" $ "cd " <> dir <> "; ghcid -W --command='cabal new-repl'"