Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > db7a4a658d190b3e658423135710c498 > files > 1044

ghc-darcs-devel-2.8.3-1.fc18.i686.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
<title>src/Darcs/Patch/Format.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Darcs</span><span class='hs-varop'>.</span><span class='hs-conid'>Patch</span><span class='hs-varop'>.</span><span class='hs-conid'>Format</span>
<a name="line-2"></a>    <span class='hs-layout'>(</span> <span class='hs-conid'>PatchListFormat</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-conid'>ListFormat</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
<a name="line-3"></a>    <span class='hs-layout'>,</span> <span class='hs-conid'>FileNameFormat</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <span class='hs-layout'>)</span>
<a name="line-4"></a>    <span class='hs-keyword'>where</span>
<a name="line-5"></a>
<a name="line-6"></a><span class='hs-cpp'>#include "gadts.h"</span>
<a name="line-7"></a>
<a name="line-8"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- | Showing and reading lists of patches This class allows us to control how</span>
<a name="line-9"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- lists of patches are formatted on disk. For legacy reasons V1 patches have</span>
<a name="line-10"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- their own special treatment (see 'ListFormat'). Other patch types use the</span>
<a name="line-11"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- default format which just puts them in a sequence without separators or any</span>
<a name="line-12"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- prelude/epilogue.</span>
<a name="line-13"></a><a name="PatchListFormat"></a><span class='hs-comment'>--</span>
<a name="line-14"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- This means that 'FL (FL p)' etc would be ambiguous, so there are no instances</span>
<a name="line-15"></a><a name="PatchListFormat"></a><span class='hs-comment'>-- for 'FL p' or other list types.</span>
<a name="line-16"></a><a name="PatchListFormat"></a><span class='hs-keyword'>class</span> <span class='hs-conid'>PatchListFormat</span> <span class='hs-varid'>p</span> <span class='hs-keyword'>where</span>
<a name="line-17"></a>  <span class='hs-varid'>patchListFormat</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ListFormat</span> <span class='hs-varid'>p</span>
<a name="line-18"></a>  <span class='hs-varid'>patchListFormat</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>ListFormatDefault</span>
<a name="line-19"></a>
<a name="line-20"></a><a name="ListFormat"></a><span class='hs-comment'>-- | This type is used to tweak the way that lists of 'p' are shown for a given</span>
<a name="line-21"></a><a name="ListFormat"></a><span class='hs-comment'>-- 'Patch' type 'p'. It is needed to maintain backwards compatibility for V1 and</span>
<a name="line-22"></a><a name="ListFormat"></a><span class='hs-comment'>-- V2 patches.</span>
<a name="line-23"></a><a name="ListFormat"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>ListFormat</span> <span class='hs-layout'>(</span><span class='hs-varid'>p</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>PATCHKIND</span><span class='hs-layout'>)</span>
<a name="line-24"></a>  <span class='hs-keyglyph'>=</span> <span class='hs-conid'>ListFormatDefault</span> <span class='hs-comment'>-- ^ Show and read lists without braces.</span>
<a name="line-25"></a>  <span class='hs-keyglyph'>|</span> <span class='hs-conid'>ListFormatV1</span>      <span class='hs-comment'>-- ^ Show lists with a single layer of braces around the outside,</span>
<a name="line-26"></a>                      <span class='hs-comment'>-- except for singletons which have no braces.</span>
<a name="line-27"></a>                      <span class='hs-comment'>-- Read with arbitrary nested braces and parens and flatten them out.</span>
<a name="line-28"></a>  <span class='hs-keyglyph'>|</span> <span class='hs-conid'>ListFormatV2</span>      <span class='hs-comment'>-- ^ Show lists without braces</span>
<a name="line-29"></a>                      <span class='hs-comment'>-- Read with arbitrary nested parens and flatten them out.</span>
<a name="line-30"></a>
<a name="line-31"></a><a name="FileNameFormat"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FileNameFormat</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>OldFormat</span>
<a name="line-32"></a>                    <span class='hs-keyglyph'>|</span> <span class='hs-conid'>NewFormat</span>
</pre></body>
</html>