Commit 2ed69294 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Two more error message indendations

parent db7ce4c9
...@@ -798,7 +798,8 @@ data InstOrigin ...@@ -798,7 +798,8 @@ data InstOrigin
\begin{code} \begin{code}
pprInstLoc :: InstLoc -> SDoc pprInstLoc :: InstLoc -> SDoc
pprInstLoc (InstLoc orig locn _) pprInstLoc (InstLoc orig locn _)
= hsep [text "arising from", pp_orig orig, text "at", ppr locn] = sep [text "arising from" <+> pp_orig orig,
text "at" <+> ppr locn]
where where
pp_orig (OccurrenceOf name) = hsep [ptext SLIT("use of"), quotes (ppr name)] pp_orig (OccurrenceOf name) = hsep [ptext SLIT("use of"), quotes (ppr name)]
pp_orig (IPOccOrigin name) = hsep [ptext SLIT("use of implicit parameter"), quotes (ppr name)] pp_orig (IPOccOrigin name) = hsep [ptext SLIT("use of implicit parameter"), quotes (ppr name)]
......
...@@ -2451,8 +2451,8 @@ addNoInstanceErrs mb_what givens dicts ...@@ -2451,8 +2451,8 @@ addNoInstanceErrs mb_what givens dicts
ptext SLIT("to the") <+> what] ] ptext SLIT("to the") <+> what] ]
fix2 | null instance_dicts = [] fix2 | null instance_dicts = []
| otherwise = [ ptext SLIT("add an instance declaration for") | otherwise = [ sep [ptext SLIT("add an instance declaration for"),
<+> pprDictsTheta instance_dicts ] pprDictsTheta instance_dicts] ]
instance_dicts = [d | d <- dicts, isClassDict d, not (isTyVarDict d)] instance_dicts = [d | d <- dicts, isClassDict d, not (isTyVarDict d)]
-- Insts for which it is worth suggesting an adding an instance declaration -- Insts for which it is worth suggesting an adding an instance declaration
-- Exclude implicit parameters, and tyvar dicts -- Exclude implicit parameters, and tyvar dicts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment