@@ -221,11 +221,19 @@ pprintErr' i (ElaboratingArg f x _ e)
221 | isUN x =
221 | isUN x =
222 text "When elaborating argument" <+>
222 text "When elaborating argument" <+>
223 annotate (AnnBoundName x False) (text (showbasic x)) <+> --TODO check plicity
223 annotate (AnnBoundName x False) (text (showbasic x)) <+> --TODO check plicity
224− text "to function" <+> annName f <> colon <>
224+ text "to" <+> whatIsName <> annName f <> colon <>
225 indented (pprintErr' i e)
225 indented (pprintErr' i e)
226 | otherwise =
226 | otherwise =
227− text "When elaborating an application of function" <+>
227+ text "When elaborating an application of" <+> whatIsName <>
228 annName f <> colon <> indented (pprintErr' i e)
228 annName f <> colon <> indented (pprintErr' i e)
229+ where whatIsName = let ctxt = tt_ctxt i
230+ in if isTConName f ctxt
231+ then text "type constructor" <> space
232+ else if isConName f ctxt
233+ then text "constructor" <> space
234+ else if isFnName f ctxt
235+ then text "function" <> space
229pprintErr' i (ProviderError msg) = text ("Type provider error: " ++ msg)
237pprintErr' i (ProviderError msg) = text ("Type provider error: " ++ msg)
230pprintErr' i (LoadingFailed fn e) = text "Loading" <+> text fn <+> text "failed:" <+> pprintErr' i e
238pprintErr' i (LoadingFailed fn e) = text "Loading" <+> text fn <+> text "failed:" <+> pprintErr' i e
231pprintErr' i (ReflectionError parts orig) =
239pprintErr' i (ReflectionError parts orig) =