mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-08-19 18:56:21 -06:00
yet another variation of the overloading error
This commit is contained in:
@@ -659,12 +659,16 @@ resolveOverloads scope c t0 q args mb_ty = do
|
|||||||
|
|
||||||
minimum g ttys0 arg_tys [] = (maxBound,err)
|
minimum g ttys0 arg_tys [] = (maxBound,err)
|
||||||
where
|
where
|
||||||
err = evalError ("Overload resolution failed" $$
|
err = evalError ("no overload instance in the term" $$
|
||||||
"of term " <+> pp (foldl App (Q q) args) $$
|
nest 4 (pp (foldl App (Q q) args)) $$
|
||||||
"with alternatives" $$
|
(case mb_ty of
|
||||||
nest 4 (vcat [pp (snd q) <+> pp ':' <+> ppTerm Terse 0 ty | (_,ty) <- ttys0]) $$
|
Just vty -> pp "with value type" $$
|
||||||
|
nest 4 (ppValue Unqualified 0 vty)
|
||||||
|
Nothing -> empty) $$
|
||||||
"and argument types" $$
|
"and argument types" $$
|
||||||
nest 4 (fsep (punctuate (pp ',') [ppValue Terse 0 ty | (_,_,ty) <- arg_tys])))
|
nest 4 (fsep (punctuate (pp ',') [ppValue Terse 0 ty | (_,_,ty) <- arg_tys])) $$
|
||||||
|
"among alternatives" $$
|
||||||
|
nest 4 (vcat [pp (snd q) <+> pp ':' <+> ppTerm Terse 0 ty | (_,ty) <- ttys0]))
|
||||||
|
|
||||||
minimum g ttys0 arg_tys (tty@(t,ty):ttys) =
|
minimum g ttys0 arg_tys (tty@(t,ty):ttys) =
|
||||||
let a = arity ty
|
let a = arity ty
|
||||||
|
|||||||
Reference in New Issue
Block a user