module Unison.Merge.PartialDeclNameLookup
  ( PartialDeclNameLookup (..),
  )
where

import Unison.Name (Name)
import Unison.Prelude

-- | Like a @DeclNameLookup@, but "partial" / more lenient - because we don't require the LCA of a merge to have a full
-- @DeclNameLookup@.
data PartialDeclNameLookup = PartialDeclNameLookup
  { PartialDeclNameLookup -> Map Name Name
constructorToDecl :: !(Map Name Name),
    PartialDeclNameLookup -> Map Name [Maybe Name]
declToConstructors :: !(Map Name [Maybe Name])
  }
  deriving stock ((forall x. PartialDeclNameLookup -> Rep PartialDeclNameLookup x)
-> (forall x. Rep PartialDeclNameLookup x -> PartialDeclNameLookup)
-> Generic PartialDeclNameLookup
forall x. Rep PartialDeclNameLookup x -> PartialDeclNameLookup
forall x. PartialDeclNameLookup -> Rep PartialDeclNameLookup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. PartialDeclNameLookup -> Rep PartialDeclNameLookup x
from :: forall x. PartialDeclNameLookup -> Rep PartialDeclNameLookup x
$cto :: forall x. Rep PartialDeclNameLookup x -> PartialDeclNameLookup
to :: forall x. Rep PartialDeclNameLookup x -> PartialDeclNameLookup
Generic)