on master help sign in
Merge remote-tracking branch 'origin/fix-ob-doc' into develop
commit30a83db77e1444d8da8136369842a8e3c0a23e30 authorTom Smalley <tfsmalley@gmail.com> dateWed 6 May 2020, 14:09 (6 years ago) parentf1418eeeb6f063
3 files changed+4−5
lib/command/src/Obelisk/Command.hs+2−2 lib/command/src/Obelisk/Command/Run.hs−3 lib/selftest/src/Obelisk/SelfTest.hs+2
lib/command/src/Obelisk/Command.hs+2−2
@@ -399,8 +399,8 @@ ob = \case
399399 ObCommand_Watch interpretPathsList -> withInterpretPaths interpretPathsList runWatch
400400 ObCommand_Shell (ShellOpts shellAttr interpretPathsList cmd) -> withInterpretPaths interpretPathsList $ \root interpretPaths ->
401401 nixShellForInterpretPaths False shellAttr root interpretPaths cmd
402− ObCommand_Doc shellAttr pkgs -> withProjectRoot "." $ \root ->
403− nixShellForInterpretPaths True shellAttr root emptyPathTree $ Just $ haddockCommand pkgs
402+ ObCommand_Doc shellAttr pkgs -> withInterpretPaths [] $ \root interpretPaths ->
403+ nixShellForInterpretPaths True shellAttr root interpretPaths $ Just $ haddockCommand pkgs
404404 ObCommand_Hoogle shell' port -> withProjectRoot "." $ \root -> do
405405 nixShellWithHoogle root True shell' $ Just $ "hoogle server -p " <> show port <> " --local"
406406 ObCommand_Internal icmd -> case icmd of
lib/command/src/Obelisk/Command/Run.hs−3
@@ -109,9 +109,6 @@ data PathTree a = PathTree_Node
109109 (Map FilePath (PathTree a)) -- Branches to deeper leaves
110110 deriving (Eq, Ord, Show, Functor, Foldable, Traversable)
111111
112−emptyPathTree :: PathTree a
113−emptyPathTree = PathTree_Node Nothing mempty
114−
115112-- | 2D ASCII drawing of a 'PathTree'. Adapted from Data.Tree.draw.
116113drawPathTree :: (a -> Text) -> PathTree a -> Text
117114drawPathTree 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