on master help sign in
Merge branch 'develop' into eac@clarify-imports
commita28fd106e2fd22fe366e460c75067dbd5fbac282 authorElliot Cameron <3noch@users.noreply.github.com> dateMon 11 May 2020, 16:33 (6 years ago) parent01c023bdf6cb1e
4 files changed+6−6
default.nix+2−1 lib/command/src/Obelisk/Command.hs+2−2 lib/command/src/Obelisk/Command/Run.hs−3 lib/selftest/src/Obelisk/SelfTest.hs+2
default.nix+2−1
@@ -342,8 +342,9 @@ in rec {
342342 in nixpkgs.runCommand "ob-run" {
343343 buildInputs = [ (profiled.ghc.ghcWithPackages (p: [ p.backend p.frontend])) ];
344344 } ''
345+ cp ${exeSource} $PWD/ob-run.hs
345346 mkdir -p $out/bin/
346− ghc -x hs -prof -fno-prof-auto -threaded ${exeSource} -o $out/bin/ob-run
347+ ghc -x hs -prof -fno-prof-auto -threaded ob-run.hs -o $out/bin/ob-run
347348 '';
348349
349350 linuxExeConfigurable = linuxExe;
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
@@ -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