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