@@ -221,11 +221,19 @@ pprintErr' i (ElaboratingArg f x _ e)
221221 | isUN x =
222222 text "When elaborating argument" <+>
223223 annotate (AnnBoundName x False) (text (showbasic x)) <+> --TODO check plicity
224− text "to function" <+> annName f <> colon <>
224+ text "to" <+> whatIsName <> annName f <> colon <>
225225 indented (pprintErr' i e)
226226 | otherwise =
227− text "When elaborating an application of function" <+>
227+ text "When elaborating an application of" <+> whatIsName <>
228228 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
236+ else empty
229237pprintErr' i (ProviderError msg) = text ("Type provider error: " ++ msg)
230238pprintErr' i (LoadingFailed fn e) = text "Loading" <+> text fn <+> text "failed:" <+> pprintErr' i e
231239pprintErr' i (ReflectionError parts orig) =