diff --git a/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs b/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs index 4f9af0b961..060e2841b9 100644 --- a/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs +++ b/unison-cli/src/Unison/Codebase/Editor/HandleInput.hs @@ -560,9 +560,8 @@ loop e = do Cli.respond $ Output.MarkdownOut (Text.intercalate "\n---\n" mdText) DocsToHtmlI namespacePath' sourceDirectory -> do Cli.Env {codebase, sandboxedRuntime} <- ask - rootBranch <- Cli.getRootBranch - absPath <- Path.unabsolute <$> Cli.resolvePath' namespacePath' - _evalErrs <- liftIO $ (Backend.docsInBranchToHtmlFiles sandboxedRuntime codebase rootBranch absPath sourceDirectory) + branch <- liftIO $ Codebase.getBranchAtPath codebase absPath + _evalErrs <- liftIO $ (Backend.docsInBranchToHtmlFiles sandboxedRuntime codebase branch sourceDirectory) pure () AliasTermI src' dest' -> do Cli.Env {codebase} <- ask diff --git a/unison-share-api/src/Unison/Server/Backend.hs b/unison-share-api/src/Unison/Server/Backend.hs index 791548d878..413f718a1e 100644 --- a/unison-share-api/src/Unison/Server/Backend.hs +++ b/unison-share-api/src/Unison/Server/Backend.hs @@ -911,13 +911,11 @@ docsInBranchToHtmlFiles :: Rt.Runtime Symbol -> Codebase IO Symbol Ann -> Branch IO -> - Path -> FilePath -> -- Returns any doc evaluation errors which may have occurred. -- Note that all docs will still be rendered even if there are errors. IO [Rt.Error] -docsInBranchToHtmlFiles runtime codebase root currentPath directory = do - let currentBranch = Branch.getAt' currentPath root +docsInBranchToHtmlFiles runtime codebase currentBranch directory = do let allTerms = (R.toList . Branch.deepTerms . Branch.head) currentBranch -- ignores docs inside lib namespace, recursively let notLib (_, name) = "lib" `notElem` Name.segments name