@@ -327,8 +327,9 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.Metavariables cols) =
327327 -> ([(String, String, SpanList OutputAnnotation)],
328328 (String, SpanList OutputAnnotation))
329329 sexpGoal ist cols imp ns ([], concl) =
330− let concl' = displaySpans . renderPretty 0.9 cols . fmap (fancifyAnnots ist) $
331− pprintPTerm imp (zip ns (repeat False)) [] concl
330+ let infixes = idris_infixes ist
331+ concl' = displaySpans . renderPretty 0.9 cols . fmap (fancifyAnnots ist) $
332+ pprintPTerm imp (zip ns (repeat False)) [] infixes concl
332333 in ([], concl')
333334 sexpGoal ist cols imp ns ((n, t):ps, concl) =
334335 let n' = case n of
@@ -337,7 +338,7 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.Metavariables cols) =
337338 | otherwise -> str nm
338339 _ -> "_"
339340 (t', spans) = displaySpans . renderPretty 0.9 cols . fmap (fancifyAnnots ist) $
340− pprintPTerm imp (zip ns (repeat False)) [] t
341+ pprintPTerm imp (zip ns (repeat False)) [] (idris_infixes ist) t
341342 rest = sexpGoal ist cols imp (n:ns) (ps, concl)
342343 in ((n', t', spans) : fst rest, snd rest)
343344runIdeSlaveCommand id orig fn mods (IdeSlave.WhoCalls n) =
@@ -562,21 +563,19 @@ process h fn (Eval t)
562563 ist <- getIState
563564 logLvl 3 $ "Raw: " ++ show (tm', ty')
564565 logLvl 10 $ "Debug: " ++ showEnvDbg [] tm'
565− let imp = opt_showimp (idris_options ist)
566− tmDoc = prettyImp imp (delab ist tm')
567− tyDoc = prettyImp imp (delab ist ty')
566+ let tmDoc = prettyIst ist (delab ist tm')
567+ tyDoc = prettyIst ist (delab ist ty')
568568 ihPrintTermWithType h tmDoc tyDoc
569569
570570process h fn (ExecVal t)
571571 = do ctxt <- getContext
572572 ist <- getIState
573− let imp = opt_showimp (idris_options ist)
574573 (tm, ty) <- elabVal toplevel False t
575574-- let tm' = normaliseAll ctxt [] tm
576575 let ty' = normaliseAll ctxt [] ty
577576 res <- execute tm
578− let (resOut, tyOut) = (prettyImp imp (delab ist res),
579− prettyImp imp (delab ist ty'))
577+ let (resOut, tyOut) = (prettyIst ist (delab ist res),
578+ prettyIst ist (delab ist ty'))
580579 ihPrintTermWithType h resOut tyOut
581580
582581process h fn (Check (PRef _ n))
@@ -611,7 +610,7 @@ process h fn (Check (PRef _ n))
611610 annotate (AnnName n Nothing Nothing Nothing) (text $ show n) <+> colon <+>
612611 align (tPretty bnd ist g)
613612
614− tPretty bnd ist t = pprintPTerm (opt_showimp (idris_options ist)) bnd [] t
613+ tPretty bnd ist t = pprintPTerm (opt_showimp (idris_options ist)) bnd [] (idris_infixes ist) t
615614
616615
617616process h fn (Check t)
@@ -622,19 +621,18 @@ process h fn (Check t)
622621 ty' = normaliseC ctxt [] ty
623622 case tm of
624623 TType _ ->
625− ihPrintTermWithType h (prettyImp imp PType) type1Doc
626− _ -> ihPrintTermWithType h (prettyImp imp (delab ist tm))
627− (prettyImp imp (delab ist ty))
624+ ihPrintTermWithType h (prettyIst ist PType) type1Doc
625+ _ -> ihPrintTermWithType h (prettyIst ist (delab ist tm))
626+ (prettyIst ist (delab ist ty))
628627
629628process h fn (DocStr n)
630− = do i <- getIState
631− let imp = opt_showimp (idris_options i)
632− case lookupCtxtName n (idris_docstrings i) of
629+ = do ist <- getIState
630+ case lookupCtxtName n (idris_docstrings ist) of
633631 [] -> iPrintError $ "No documentation for " ++ show n
634− ns -> do toShow <- mapM (showDoc imp) ns
632+ ns -> do toShow <- mapM (showDoc ist) ns
635633 ihRenderResult h (vsep toShow)
636− where showDoc imp (n, d) = do doc <- getDocs n
637− return $ pprintDocs imp doc
634+ where showDoc ist (n, d) = do doc <- getDocs n
635+ return $ pprintDocs ist doc
638636process h fn Universes
639637 = do i <- getIState
640638 let cs = idris_constraints i
@@ -826,9 +824,11 @@ process h fn (DoProofSearch updatefile rec l n hints)
826824 (tm, ty) <- elabVal toplevel False (PRef fc mn)
827825 ctxt <- getContext
828826 i <- getIState
829− return $ show (stripNS
830− (dropCtxt envlen
831− (delab i (specialise ctxt [] [(mn, 1)] tm)))))
827+ return . flip displayS "" . renderPretty 1.0 80 $
828+ pprintPTerm False [] [] (idris_infixes i)
829+ (stripNS
830+ (dropCtxt envlen
831+ (delab i (specialise ctxt [] [(mn, 1)] tm)))))
832832 (\e -> return ("?" ++ show n))
833833 if updatefile then
834834 do let fb = fn ++ "~"
@@ -1051,15 +1051,14 @@ process h fn (SetConsoleWidth w) = setWidth w
10511051
10521052process h fn (Apropos a) =
10531053 do ist <- getIState
1054− let impl = opt_showimp (idris_options ist)
10551054 let names = apropos ist (T.pack a)
10561055 let aproposInfo = [ (n,
10571056 delabTy ist n,
10581057 fmap (overview . fst) (lookupCtxtExact n (idris_docstrings ist)))
10591058 | n <- sort names, isUN n ]
1060− ihRenderResult h $ vsep (map (renderApropos impl) aproposInfo)
1061− where renderApropos impl (name, ty, docs) =
1062− prettyName True [] name <+> colon <+> align (prettyImp impl ty) <$>
1059+ ihRenderResult h $ vsep (map (renderApropos ist) aproposInfo)
1060+ where renderApropos ist (name, ty, docs) =
1061+ prettyName True [] name <+> colon <+> align (prettyIst ist ty) <$>
10631062 fromMaybe empty (fmap (\d -> renderDocstring d <> line) docs)
10641063 isUN (UN _) = True
10651064 isUN (NS n _) = isUN n