-- Copyright (C) 2003 David Roundy---- This program is free software; you can redistribute it and/or modify-- it under the terms of the GNU General Public License as published by-- the Free Software Foundation; either version 2, or (at your option)-- any later version.---- This program is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-- GNU General Public License for more details.---- You should have received a copy of the GNU General Public License-- along with this program; see the file COPYING. If not, write to-- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,-- Boston, MA 02110-1301, USA.{-# OPTIONS_GHC -cpp #-}{-# LANGUAGE CPP #-}#include "gadts.h"moduleDarcs.PrintPatch(printPatch,contextualPrintPatch,printPatchPager,printFriendly)whereimportDarcs.Patch(Patchy,showContextPatch,showPatch)importDarcs.SlurpDirectory(Slurpy)importDarcs.Arguments(DarcsFlag,showFriendly)importPrinter(putDocLnWith)importDarcs.ColorPrinter(fancyPrinters)importDarcs.External(viewDocWith)-- | @'printFriendly' opts patch@ prints @patch@ in accordance with the-- flags in opts, ie, whether @--verbose@ or @--summary@ were passed at-- the command-line.printFriendly::Patchyp=>[DarcsFlag]->pC(xy)->IO()printFriendlyoptsp=putDocLnWithfancyPrinters$showFriendlyoptsp-- | 'printPatch' prints a patch on standard output.printPatch::Patchyp=>pC(xy)->IO()printPatchp=putDocLnWithfancyPrinters$showPatchp-- | 'printPatchPager' runs '$PAGER' and shows a patch in it.printPatchPager::Patchyp=>pC(xy)->IO()printPatchPagerp=viewDocWithfancyPrinters$showPatchp-- | 'contextualPrintPatch' prints a patch, together with its context,-- on standard output.contextualPrintPatch::Patchyp=>Slurpy->pC(xy)->IO()contextualPrintPatchsp=putDocLnWithfancyPrinters$showContextPatchsp