@@ -19,20 +19,15 @@ where
19
19
20
20
import Control.Monad.Reader
21
21
import Servant (Capture , QueryParam , (:>) )
22
- import U.Codebase.Causal qualified as V2Causal
23
22
import U.Codebase.HashTags (CausalHash )
24
- import U.Codebase.Sqlite.NameLookups (PathSegments (.. ))
25
- import U.Codebase.Sqlite.Operations qualified as Ops
26
23
import Unison.Codebase (Codebase )
27
24
import Unison.Codebase qualified as Codebase
28
25
import Unison.Codebase.Path qualified as Path
29
26
import Unison.Codebase.ShortCausalHash (ShortCausalHash )
30
27
import Unison.HashQualified qualified as HQ
31
28
import Unison.Name (Name )
32
- import Unison.NameSegment.Internal (NameSegment (NameSegment ))
33
29
import Unison.Parser.Ann (Ann )
34
30
import Unison.Prelude
35
- import Unison.PrettyPrintEnvDecl.Sqlite qualified as PPESqlite
36
31
import Unison.Reference (Reference )
37
32
import Unison.Reference qualified as Reference
38
33
import Unison.Referent (Referent )
@@ -71,11 +66,10 @@ serveTermSummary ::
71
66
Backend IO TermSummary
72
67
serveTermSummary codebase referent mayName root relativeTo mayWidth = do
73
68
let relativeToPath = fromMaybe mempty relativeTo
74
- namesPerspective <- Backend. hoistBackend (Codebase. runTransaction codebase) do
75
- root <- Backend. normaliseRootCausalHash root
76
- namesPerspective <- lift $ Ops. namesPerspectiveForRootAndPath (V2Causal. valueHash root) (coerce $ Path. toList relativeToPath)
77
- pure namesPerspective
78
- let mkPPED deps = PPESqlite. ppedForReferences namesPerspective deps
69
+ root <- Backend. hoistBackend (Codebase. runTransaction codebase) do
70
+ Backend. normaliseRootCausalHash root
71
+ (_, ppe) <- Backend. namesAtPathFromRootBranchHash codebase root relativeToPath
72
+ let mkPPED _deps = pure ppe
79
73
Backend. termSummaryForReferent codebase referent mayName mkPPED mayWidth
80
74
81
75
type TypeSummaryAPI =
0 commit comments