Skip to content

Commit ec1c431

Browse files
committed
Fix up share against latest trunk
1 parent 8d7e285 commit ec1c431

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

share-api/src/Share/Codebase.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ import Unison.ConstructorType qualified as CT
111111
import Unison.DataDeclaration qualified as DD
112112
import Unison.DataDeclaration qualified as V1
113113
import Unison.Hash (Hash)
114+
import Unison.OrBuiltin (OrBuiltin (..))
114115
import Unison.Parser.Ann
115116
import Unison.Parser.Ann qualified as Ann
116117
import Unison.Reference (TermReferenceId)
@@ -327,12 +328,12 @@ expectTypeDeclarationsByRefIdsOf codebase trav s = do
327328
-- Includes decl constructors.
328329
termReferentsByShortHash :: (QueryM m) => ShortHash -> m (Set V1.Referent)
329330
termReferentsByShortHash = \case
330-
ShortHash.Builtin b ->
331+
Builtin b ->
331332
Builtin.intrinsicTermReferences
332333
& Set.filter (\r -> V1.ReferenceBuiltin b == r)
333334
& Set.map V1Referent.Ref
334335
& pure
335-
ShortHash.ShortHash prefix cycle cid -> do
336+
NotBuiltin (ShortHash.ShortHash prefix cycle cid) -> do
336337
termReferents <-
337338
DefnQ.termReferencesByPrefix prefix cycle
338339
<&> Set.map (V1Referent.Ref . V1.ReferenceDerived)
@@ -341,13 +342,13 @@ termReferentsByShortHash = \case
341342

342343
typeReferencesByShortHash :: (QueryA m) => ShortHash -> m (Set V1.Reference)
343344
typeReferencesByShortHash = \case
344-
ShortHash.Builtin b ->
345+
Builtin b ->
345346
Builtin.intrinsicTypeReferences
346347
& Set.filter (\r -> V1.ReferenceBuiltin b == r)
347348
& pure
348349
-- type references shouldn't have a constructor.
349-
(ShortHash.ShortHash _prefix _cycle (Just {})) -> pure mempty
350-
(ShortHash.ShortHash prefix cycle Nothing) -> do
350+
(NotBuiltin (ShortHash.ShortHash _prefix _cycle (Just {}))) -> pure mempty
351+
(NotBuiltin (ShortHash.ShortHash prefix cycle Nothing)) -> do
351352
DefnQ.declReferencesByPrefix prefix cycle
352353
<&> Set.map V1.ReferenceDerived
353354

0 commit comments

Comments
 (0)