@@ -490,6 +490,12 @@ getUndefined :: Idris [Name]
490490getUndefined = do i <- getIState
491491 return (map fst (idris_metavars i) \\ primDefs)
492492
493+isMetavarName :: Name -> IState -> Bool
494+isMetavarName n ist
495+ = case lookupNames n (tt_ctxt ist) of
496+ (t:_) -> isJust $ lookup t (idris_metavars ist)
497+ _ -> False
498+
493499getWidth :: Idris ConsoleWidth
494500getWidth = fmap idris_consolewidth getIState
495501
@@ -579,10 +585,11 @@ fancifyAnnots :: IState -> OutputAnnotation -> OutputAnnotation
579585fancifyAnnots ist annot@(AnnName n _ _) =
580586 do let ctxt = tt_ctxt ist
581587 case () of
582− _ | isDConName n ctxt -> AnnName n (Just DataOutput) Nothing
583− _ | isFnName n ctxt -> AnnName n (Just FunOutput) Nothing
584− _ | isTConName n ctxt -> AnnName n (Just TypeOutput) Nothing
585− _ | otherwise -> annot
588+ _ | isDConName n ctxt -> AnnName n (Just DataOutput) Nothing
589+ _ | isFnName n ctxt -> AnnName n (Just FunOutput) Nothing
590+ _ | isTConName n ctxt -> AnnName n (Just TypeOutput) Nothing
591+ _ | isMetavarName n ist -> AnnName n (Just MetavarOutput) Nothing
592+ _ | otherwise -> annot
586593fancifyAnnots _ annot = annot
587594
588595type1Doc :: Doc OutputAnnotation