Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide unresolved/resolved states in lf/interface library #14115

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ sealed abstract class TemplateChoices[+Ty] extends Product with Serializable {
/** Coerce to [[Resolved]] based on the environment `astInterfaces`, or fail
* with the choices that could not be resolved.
*/
def resolveChoices[O >: Ty](
private[iface] def resolveChoices[O >: Ty](
astInterfaces: PartialFunction[Ref.TypeConName, DefInterface[O]]
): Either[ResolveError[Resolved[O]], Resolved[O]] = this match {
case Unresolved(direct, unresolved) =>
Expand Down Expand Up @@ -323,7 +323,7 @@ object TemplateChoices {
copy(partialResolution = f(partialResolution))
}

final case class Unresolved[+Ty](
private[iface] final case class Unresolved[+Ty](
directChoices: Map[Ref.ChoiceName, TemplateChoice[Ty]],
unresolvedChoiceSources: NonEmpty[Set[Ref.TypeConName]],
) extends TemplateChoices[Ty] {
Expand All @@ -336,7 +336,7 @@ object TemplateChoices {
) =
directChoices transform ((_, c) => NonEmpty(Map, (none[Ref.TypeConName], c)))

final case class Resolved[+Ty](
private[iface] final case class Resolved[+Ty](
resolvedChoices: Map[Ref.ChoiceName, NonEmpty[
Map[Option[Ref.TypeConName], TemplateChoice[Ty]]
]]
Expand Down