makeDeclFacts :: Decl -> Conversion [Raw.Entry]
makeDeclFacts decl@Decl{..} = do
    declVName <- tickVName declTick
    -- TODO(robinpalotai): use actual node type (Variable is a catch-all now).
    -- TODO(robinpalotai): emit type entries.
    -- TODO(robinpalotai): emit Module childofness if top-level.
    let declFacts = nodeFacts declVName VariableNK
                        [nodeFact CompleteF Definition]
    anchorEntries <- makeAnchor (declPreferredUiSpan decl)
                         DefinesBindingE declVName
                         Nothing  -- snippet
                         -- TODO(robinpalotai): plumb high-level context to
                         -- Decl entries too in backend.
                         Nothing
    childOfModule <- if tickUniqueInModule declTick
        then Just . edge declVName ChildOfE <$> asks pkgVName
        else return Nothing
    return (declFacts ++ anchorEntries ++ maybeToList childOfModule)

-- | Makes all entries for a doc/uri declaration.
makeDeclFacts :: Decl -> Conversion [Raw.Entry]
makeDeclFacts decl@Decl{..} = do
    declVName <- tickVName declTick
    -- TODO(robinpalotai): use actual node type (Variable is a catch-all now).
    -- TODO(robinpalotai): emit type entries.
    -- TODO(robinpalotai): emit Module childofness if top-level.
    let declFacts = nodeFacts declVName VariableNK
                        [nodeFact CompleteF Definition]
    anchorEntries <- makeAnchor (declPreferredUiSpan decl)
                         DefinesBindingE declVName
                         Nothing  -- snippet
                         -- TODO(robinpalotai): plumb high-level context to
                         -- Decl entries too in backend.
                         Nothing
    childOfModule <- if tickUniqueInModule declTick
        then Just . edge declVName ChildOfE <$> asks pkgVName
        else return Nothing
    return (declFacts ++ anchorEntries ++ maybeToList childOfModule)

-- | Makes all entries for a doc/uri declaration.
makeDeclFacts decl@Decl{..} = do
    declVName <- tickVName declTick
    -- TODO(robinpalotai): use actual node type (Variable is a catch-all now).
    -- TODO(robinpalotai): emit type entries.
    -- TODO(robinpalotai): emit Module childofness if top-level.
    let declFacts = nodeFacts declVName VariableNK
                        [nodeFact CompleteF Definition]
    anchorEntries <- makeAnchor (declPreferredUiSpan decl)
                         DefinesBindingE declVName
                         Nothing  -- snippet
                         -- TODO(robinpalotai): plumb high-level context to
                         -- Decl entries too in backend.
                         Nothing
    childOfModule <- if tickUniqueInModule declTick
        then Just . edge declVName ChildOfE <$> asks pkgVName
        else return Nothing
    return (declFacts ++ anchorEntries ++ maybeToList childOfModule)

-- | Makes all entries for a doc/uri declaration.