on master help sign in
Merge branch 'develop' into use-posix-escape
commitac8db407cc4617c644f3382a57e098594fc00bf7 authorTom Smalley <tfsmalley@gmail.com> dateWed 6 May 2020, 14:26 (6 years ago) parentb83026e30a83db
4 files changed+5−5
lib/cliapp/obelisk-cliapp.cabal+1 lib/command/src/Obelisk/Command.hs+2−2 lib/command/src/Obelisk/Command/Run.hs−3 lib/selftest/src/Obelisk/SelfTest.hs+2
lib/cliapp/obelisk-cliapp.cabal+1
@@ -18,6 +18,7 @@ library
1818 , logging-effect
1919 , monad-loops
2020 , mtl
21+ , posix-escape
2122 , process
2223 , shell-escape
2324 , terminal-size
lib/command/src/Obelisk/Command.hs+2−2
@@ -401,8 +401,8 @@ ob = \case
401401 ObCommand_Watch interpretPathsList -> withInterpretPaths interpretPathsList runWatch
402402 ObCommand_Shell (ShellOpts shellAttr interpretPathsList cmd) -> withInterpretPaths interpretPathsList $ \root interpretPaths ->
403403 nixShellForInterpretPaths False shellAttr root interpretPaths (pure . bash . BSU.fromString <$> cmd)
404− ObCommand_Doc shellAttr pkgs -> withProjectRoot "." $ \root ->
405− nixShellForInterpretPaths True shellAttr root emptyPathTree $ Just [haddockCommand pkgs]
404+ ObCommand_Doc shellAttr pkgs -> withInterpretPaths [] $ \root interpretPaths ->
405+ nixShellForInterpretPaths True shellAttr root interpretPaths $ Just [haddockCommand pkgs]
406406 ObCommand_Hoogle shell' port -> withProjectRoot "." $ \root -> do
407407 nixShellWithHoogle root True shell' $ Just $ fmap (bash . BSU.fromString) ["hoogle", "server", "-p", show port, "--local"]
408408 ObCommand_Internal icmd -> case icmd of
lib/command/src/Obelisk/Command/Run.hs−3
@@ -111,9 +111,6 @@ data PathTree a = PathTree_Node
111111 (Map FilePath (PathTree a)) -- Branches to deeper leaves
112112 deriving (Eq, Ord, Show, Functor, Foldable, Traversable)
113113
114−emptyPathTree :: PathTree a
115−emptyPathTree = PathTree_Node Nothing mempty
116−
117114-- | 2D ASCII drawing of a 'PathTree'. Adapted from Data.Tree.draw.
118115drawPathTree :: (a -> Text) -> PathTree a -> Text
119116drawPathTree showA (PathTree_Node _ ts0) = T.intercalate "\n" $ goForest (Map.toList ts0)
lib/selftest/src/Obelisk/SelfTest.hs+2
@@ -243,6 +243,8 @@ main' isVerbose httpManager obeliskRepoReadOnly = withInitCache $ \initCache ->
243243 uu <- update
244244 assertRevEQ u uu
245245
246+ it "can run 'ob doc'" $ inTmpObInit $ \_ -> runOb ["doc", "reflex"]
247+
246248 describe "ob thunk pack/unpack" $ parallel $ do
247249 it "has thunk pack and unpack inverses" $ inTmpObInitWithImplCopy $ \_ -> do
248250