unison-core1-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.PartialDeclNameLookup

Synopsis

Documentation

data PartialDeclNameLookup Source #

Like a DeclNameLookup, but "partial" / more lenient - because we don't require the LCA of a merge to have a full DeclNameLookup.

Instances

Instances details
Generic PartialDeclNameLookup Source # 
Instance details

Defined in Unison.PartialDeclNameLookup

Associated Types

type Rep PartialDeclNameLookup :: Type -> Type #

type Rep PartialDeclNameLookup Source # 
Instance details

Defined in Unison.PartialDeclNameLookup

type Rep PartialDeclNameLookup = D1 ('MetaData "PartialDeclNameLookup" "Unison.PartialDeclNameLookup" "unison-core1-0.0.0-81K0NP5FQX63ztzOFtUCNN" 'False) (C1 ('MetaCons "PartialDeclNameLookup" 'PrefixI 'True) (S1 ('MetaSel ('Just "constructorToDecl") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Name Name)) :*: S1 ('MetaSel ('Just "declToConstructors") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Name [Maybe Name]))))

toDeclNameLookup :: (Text -> Name) -> PartialDeclNameLookup -> DeclNameLookup Source #

Turn a partial decl name lookup into a total decl name lookup.

This isn't very sensible, but in certain cases we do find ourselves in the unfortunate circumstance of needing to render a type declaration that doesn't have a name for one or more of its constructors (as when rendering the LCA file of a difftool or mergetool, since we do allow the LCA to have missing constructors).

This function just assigns bogus names like Unnamed for rendering.