@@ -34,7 +34,7 @@ import Idris.Output (iRenderOutput, iPrintResult, iRenderResult)
3434
3535import Prelude hiding (pred)
3636
37−import Util.Pretty (text, char, vsep, (<>), Doc)
37+import Util.Pretty (text, char, vsep, (<>), Doc, annotate)
3838
3939searchByType :: PTerm -> Idris ()
4040searchByType pterm = do
@@ -173,13 +173,14 @@ data Score = Score
173173 , asymMods :: !(Sided AsymMods)
174174 } deriving (Eq, Show)
175175
176−displayScore :: Score -> Doc a
177−displayScore score = text $ case both noMods (asymMods score) of
178− Sided True True -> "=" -- types are isomorphic
179− Sided True False -> "<" -- found type is more general than searched type
180− Sided False True -> ">" -- searched type is more general than found type
181− Sided False False -> "_"
176+displayScore :: Score -> Doc OutputAnnotation
177+displayScore score = case both noMods (asymMods score) of
178+ Sided True True -> annotated EQ "=" -- types are isomorphic
179+ Sided True False -> annotated LT "<" -- found type is more general than searched type
180+ Sided False True -> annotated GT ">" -- searched type is more general than found type
181+ Sided False False -> text "_"
182182 where
183+ annotated ordr = annotate (AnnSearchResult ordr) . text
183184 noMods (Mods app tcApp tcIntro) = app + tcApp + tcIntro == 0
184185
185186scoreCriterion :: Score -> Bool