anchorVName :: SourcePath -> OffsetRange -> Raw.VName -> Conversion Raw.VName
anchorVName sourcePath (OffsetRange s e) targetVName =
    update <$> asks baseVName
  where
    update v = v
        { vnPath = unSourcePath sourcePath
        , vnSignature = vnSignature targetVName
                      <> ":" <> tshow s <> "," <> tshow e
        }

-- | An implicit anchor doesn't have a source location, but we still need to
-- make a unique VName for it. So we generate it from the signature of the
-- target.
-- TODO(robinp): this should still have the current sourcePath set.
-- TODO(robinp): could randomize signature to make multiple implicit anchors
--               stay distinct. Though not clear if that is useful.
anchorVName :: SourcePath -> OffsetRange -> Raw.VName -> Conversion Raw.VName
anchorVName sourcePath (OffsetRange s e) targetVName =
    update <$> asks baseVName
  where
    update v = v
        { vnPath = unSourcePath sourcePath
        , vnSignature = vnSignature targetVName
                      <> ":" <> tshow s <> "," <> tshow e
        }

-- | An implicit anchor doesn't have a source location, but we still need to
-- make a unique VName for it. So we generate it from the signature of the
-- target.
-- TODO(robinp): this should still have the current sourcePath set.
-- TODO(robinp): could randomize signature to make multiple implicit anchors
--               stay distinct. Though not clear if that is useful.
anchorVName sourcePath (OffsetRange s e) targetVName =
    update <$> asks baseVName
  where
    update v = v
        { vnPath = unSourcePath sourcePath
        , vnSignature = vnSignature targetVName
                      <> ":" <> tshow s <> "," <> tshow e
        }

-- | An implicit anchor doesn't have a source location, but we still need to
-- make a unique VName for it. So we generate it from the signature of the
-- target.
-- TODO(robinp): this should still have the current sourcePath set.
-- TODO(robinp): could randomize signature to make multiple implicit anchors
--               stay distinct. Though not clear if that is useful.