process fn (Core t)
   = case t of
       PRef _ _ n ->
         do ist <- getIState
            case lookupDef n (tt_ctxt ist) of
              [CaseOp _ _ _ _ _ _] -> pprintDef True n >>= iRenderResult . vsep
              _ -> coreTerm t
       t -> coreTerm t
   where coreTerm t =
           do (tm, ty) <- elabREPL (recinfo (fileFC "toplevel")) ERHS t
              iPrintTermWithType (pprintTT [] tm) (pprintTT [] ty)
process fn (Core t)
   = case t of
       PRef _ _ n ->
         do ist <- getIState
            case lookupDef n (tt_ctxt ist) of
              [CaseOp _ _ _ _ _ _] -> pprintDef True n >>= iRenderResult . vsep
              _ -> coreTerm t
       t -> coreTerm t
   where coreTerm t =
           do (tm, ty) <- elabREPL (recinfo (fileFC "toplevel")) ERHS t
              iPrintTermWithType (pprintTT [] tm) (pprintTT [] ty)
process fn (Core t)
   = case t of
       PRef _ _ n ->
         do ist <- getIState
            case lookupDef n (tt_ctxt ist) of
              [CaseOp _ _ _ _ _ _] -> pprintDef True n >>= iRenderResult . vsep
              _ -> coreTerm t
       t -> coreTerm t
   where coreTerm t =
           do (tm, ty) <- elabREPL (recinfo (fileFC "toplevel")) ERHS t
              iPrintTermWithType (pprintTT [] tm) (pprintTT [] ty)