@@ -490,6 +490,12 @@ getUndefined :: Idris [Name]
490getUndefined = do i <- getIState
490getUndefined = do i <- getIState
491 return (map fst (idris_metavars i) \\ primDefs)
491 return (map fst (idris_metavars i) \\ primDefs)
493+isMetavarName :: Name -> IState -> Bool
495+ = case lookupNames n (tt_ctxt ist) of
496+ (t:_) -> isJust $ lookup t (idris_metavars ist)
493getWidth :: Idris ConsoleWidth
499getWidth :: Idris ConsoleWidth
494getWidth = fmap idris_consolewidth getIState
500getWidth = fmap idris_consolewidth getIState
@@ -579,10 +585,11 @@ fancifyAnnots :: IState -> OutputAnnotation -> OutputAnnotation
579fancifyAnnots ist annot@(AnnName n _ _) =
585fancifyAnnots ist annot@(AnnName n _ _) =
580 do let ctxt = tt_ctxt ist
586 do let ctxt = tt_ctxt ist
581 case () of
587 case () of
582− _ | isDConName n ctxt -> AnnName n (Just DataOutput) Nothing
588+ _ | isDConName n ctxt -> AnnName n (Just DataOutput) Nothing
583− _ | isFnName n ctxt -> AnnName n (Just FunOutput) Nothing
589+ _ | isFnName n ctxt -> AnnName n (Just FunOutput) Nothing
584− _ | isTConName n ctxt -> AnnName n (Just TypeOutput) Nothing
590+ _ | isTConName n ctxt -> AnnName n (Just TypeOutput) Nothing
591+ _ | isMetavarName n ist -> AnnName n (Just MetavarOutput) Nothing
585− _ | otherwise -> annot
592+ _ | otherwise -> annot
586fancifyAnnots _ annot = annot
593fancifyAnnots _ annot = annot
588type1Doc :: Doc OutputAnnotation
595type1Doc :: Doc OutputAnnotation