Merge remote-tracking branch 'origin/trunk' into feature/2112

This commit is contained in:
Paul Chiusano 2021-06-18 11:11:36 -05:00
commit 036ac7d63f
3 changed files with 7 additions and 8 deletions

View File

@ -52,3 +52,4 @@ The format for this list: name, GitHub handle, and then optional blurb about wha
* Nigel Farrelly (@nini-faroux)
* Johannes Huster (@JohannesHuster)
* Joseph Morag (@jmorag)
* Tavish Pegram (@tapegram)

View File

@ -177,9 +177,9 @@ renderTypeError e env src = case e of
<> style ErrorSite "if"
<> "-expression has to be"
AndMismatch ->
"The arguments to " <> style ErrorSite "and" <> " have to be"
"The arguments to " <> style ErrorSite "&&" <> " have to be"
OrMismatch ->
"The arguments to " <> style ErrorSite "or" <> " have to be"
"The arguments to " <> style ErrorSite "||" <> " have to be"
GuardMismatch ->
"The guard expression for a "
<> style ErrorSite "match"

View File

@ -557,21 +557,19 @@ prettyDefinitionsBySuffixes relativeTo root renderWidth suffixifyBindings codeba
termFqns :: Map Reference (Set Text)
termFqns = Map.mapWithKey f terms
where
f k _ =
R.lookupRan (Referent.Ref' k)
. R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
rel = R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
. R.mapDom Name.toText
. Names.terms
$ currentNames parseNames
f k _ = R.lookupRan (Referent.Ref' k) rel
typeFqns :: Map Reference (Set Text)
typeFqns = Map.mapWithKey f types
where
f k _ =
R.lookupRan k
. R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
rel = R.filterDom (\n -> "." `Text.isPrefixOf` n && n /= ".")
. R.mapDom Name.toText
. Names.types
$ currentNames parseNames
f k _ = R.lookupRan k rel
flatten = Set.toList . fromMaybe Set.empty
mkTermDefinition r tm = do
ts <- lift (Codebase.getTypeOfTerm codebase r)