/usr/share/doc/libghc-readargs-doc/html/src/ReadArgs.html is in libghc-readargs-doc 1.2.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | <?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>ReadArgs.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, UndecidableInstances, OverlappingInstances, TypeOperators #-}</span>
<a name="line-2"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>ReadArgs</span> <span class='hs-keyword'>where</span>
<a name="line-3"></a>
<a name="line-4"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Arrow</span> <span class='hs-layout'>(</span><span class='hs-varid'>first</span><span class='hs-layout'>)</span>
<a name="line-5"></a>
<a name="line-6"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Maybe</span>
<a name="line-7"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>List</span>
<a name="line-8"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Typeable</span>
<a name="line-9"></a>
<a name="line-10"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Text</span> <span class='hs-layout'>(</span><span class='hs-conid'>Text</span><span class='hs-layout'>,</span> <span class='hs-varid'>pack</span><span class='hs-layout'>)</span>
<a name="line-11"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Filesystem</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-layout'>(</span><span class='hs-conid'>FilePath</span><span class='hs-layout'>)</span>
<a name="line-12"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Filesystem</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span><span class='hs-varop'>.</span><span class='hs-conid'>CurrentOS</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromText</span><span class='hs-layout'>)</span>
<a name="line-13"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span> <span class='hs-layout'>(</span><span class='hs-conid'>FilePath</span><span class='hs-layout'>)</span>
<a name="line-14"></a>
<a name="line-15"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Environment</span>
<a name="line-16"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Exit</span>
<a name="line-17"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span> <span class='hs-varid'>hiding</span> <span class='hs-layout'>(</span><span class='hs-conid'>FilePath</span><span class='hs-layout'>)</span>
<a name="line-18"></a>
<a name="line-19"></a><a name="readArgs"></a><span class='hs-comment'>-- |parse the desired argument tuple from the command line or </span>
<a name="line-20"></a><span class='hs-comment'>-- print a simple usage statment and quit</span>
<a name="line-21"></a><span class='hs-definition'>readArgs</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
<a name="line-22"></a><span class='hs-definition'>readArgs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>getArgs</span> <span class='hs-varop'>>>=</span> <span class='hs-varid'>readArgsFrom</span>
<a name="line-23"></a>
<a name="line-24"></a><a name="readArgsFrom"></a><span class='hs-comment'>-- |read args from the given strings or </span>
<a name="line-25"></a><span class='hs-comment'>-- print a simple usage statment and quit</span>
<a name="line-26"></a><span class='hs-comment'>-- (so you can do option parsing first)</span>
<a name="line-27"></a><span class='hs-definition'>readArgsFrom</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=></span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>String</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span>
<a name="line-28"></a><span class='hs-definition'>readArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span>
<a name="line-29"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>ma</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-30"></a> <span class='hs-keyword'>in</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>ma</span> <span class='hs-keyword'>of</span>
<a name="line-31"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
<a name="line-32"></a> <span class='hs-varid'>progName</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getProgName</span>
<a name="line-33"></a> <span class='hs-varid'>hPutStrLn</span> <span class='hs-varid'>stderr</span> <span class='hs-varop'>$</span> <span class='hs-str'>"usage: "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>progName</span> <span class='hs-varop'>++</span> <span class='hs-varid'>usageFor</span> <span class='hs-varid'>a</span>
<a name="line-34"></a> <span class='hs-varid'>exitFailure</span>
<a name="line-35"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-varid'>a</span>
<a name="line-36"></a>
<a name="line-37"></a><a name="Arguable"></a><span class='hs-comment'>-- |a class for types that can be parsed from exactly one command line argument</span>
<a name="line-38"></a><a name="Arguable"></a><span class='hs-keyword'>class</span> <span class='hs-conid'>Arguable</span> <span class='hs-varid'>a</span> <span class='hs-keyword'>where</span>
<a name="line-39"></a> <span class='hs-varid'>parse</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Maybe</span> <span class='hs-varid'>a</span>
<a name="line-40"></a> <span class='hs-comment'>-- |name's argument will usually be undefined, so when defining instances of</span>
<a name="line-41"></a> <span class='hs-comment'>-- Arguable, it should be lazy in its argument</span>
<a name="line-42"></a> <span class='hs-varid'>name</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>String</span>
<a name="line-43"></a>
<a name="line-44"></a><a name="instance%20Arguable%20t"></a><span class='hs-comment'>-- |all types that are typeable and readable can be used as simple arguments</span>
<a name="line-45"></a><a name="instance%20Arguable%20t"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Typeable</span> <span class='hs-varid'>t</span><span class='hs-layout'>,</span> <span class='hs-conid'>Read</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Arguable</span> <span class='hs-varid'>t</span> <span class='hs-keyword'>where</span>
<a name="line-46"></a> <span class='hs-varid'>parse</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>reads</span> <span class='hs-varid'>s</span> <span class='hs-keyword'>of</span>
<a name="line-47"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-str'>""</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Just</span> <span class='hs-varid'>i</span>
<a name="line-48"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Nothing</span>
<a name="line-49"></a> <span class='hs-varid'>name</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>showsTypeRep</span> <span class='hs-layout'>(</span><span class='hs-varid'>typeOf</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-str'>""</span>
<a name="line-50"></a>
<a name="line-51"></a><a name="instance%20Arguable%20String"></a><span class='hs-comment'>-- |string is a special case, so that we don't force the user to double-quote</span>
<a name="line-52"></a><a name="instance%20Arguable%20String"></a><span class='hs-comment'>-- their input</span>
<a name="line-53"></a><a name="instance%20Arguable%20String"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-conid'>String</span> <span class='hs-keyword'>where</span>
<a name="line-54"></a> <span class='hs-varid'>parse</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span>
<a name="line-55"></a> <span class='hs-varid'>name</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"String"</span>
<a name="line-56"></a>
<a name="line-57"></a><a name="instance%20Arguable%20Text"></a><span class='hs-comment'>-- |Text is a special case, so that we don't force the user to double-quote</span>
<a name="line-58"></a><a name="instance%20Arguable%20Text"></a><span class='hs-comment'>-- their input</span>
<a name="line-59"></a><a name="instance%20Arguable%20Text"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-conid'>Text</span> <span class='hs-keyword'>where</span>
<a name="line-60"></a> <span class='hs-varid'>parse</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pack</span>
<a name="line-61"></a> <span class='hs-varid'>name</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Text"</span>
<a name="line-62"></a>
<a name="line-63"></a><a name="instance%20Arguable%20FilePath"></a><span class='hs-comment'>-- |FilePath is a special case, so that we don't force the user to double-quote</span>
<a name="line-64"></a><a name="instance%20Arguable%20FilePath"></a><span class='hs-comment'>-- their input</span>
<a name="line-65"></a><a name="instance%20Arguable%20FilePath"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-conid'>FilePath</span> <span class='hs-keyword'>where</span>
<a name="line-66"></a> <span class='hs-varid'>parse</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromText</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pack</span>
<a name="line-67"></a> <span class='hs-varid'>name</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"FilePath"</span>
<a name="line-68"></a>
<a name="line-69"></a><a name="instance%20Arguable%20Char"></a><span class='hs-comment'>-- |char is a special case, so that we don't force the user to single-quote</span>
<a name="line-70"></a><a name="instance%20Arguable%20Char"></a><span class='hs-comment'>-- their input</span>
<a name="line-71"></a><a name="instance%20Arguable%20Char"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-conid'>Char</span> <span class='hs-keyword'>where</span>
<a name="line-72"></a> <span class='hs-varid'>parse</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>x</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>x</span>
<a name="line-73"></a> <span class='hs-varid'>parse</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Nothing</span>
<a name="line-74"></a> <span class='hs-varid'>name</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Char"</span>
<a name="line-75"></a>
<a name="line-76"></a><a name="Argument"></a><span class='hs-comment'>-- |a class for types that can be parsed from some number of command line</span>
<a name="line-77"></a><a name="Argument"></a><span class='hs-comment'>-- arguments</span>
<a name="line-78"></a><a name="Argument"></a><span class='hs-keyword'>class</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span> <span class='hs-keyword'>where</span>
<a name="line-79"></a> <span class='hs-varid'>parseArg</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>String</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-varid'>a</span><span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>String</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
<a name="line-80"></a> <span class='hs-comment'>-- |argName's argument will usually be undefined, so when defining instances of</span>
<a name="line-81"></a> <span class='hs-comment'>-- Arguable, it should be lazy in its argument</span>
<a name="line-82"></a> <span class='hs-varid'>argName</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>String</span>
<a name="line-83"></a>
<a name="line-84"></a><a name="instance%20Argument%20a"></a><span class='hs-comment'>-- |use the arguable tyep to just parse a single argument</span>
<a name="line-85"></a><a name="instance%20Argument%20a"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span> <span class='hs-keyword'>where</span>
<a name="line-86"></a> <span class='hs-varid'>parseArg</span> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>[]</span>
<a name="line-87"></a> <span class='hs-varid'>parseArg</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span><span class='hs-conop'>:</span><span class='hs-varid'>ss</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-88"></a> <span class='hs-varid'>a</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>maybeToList</span> <span class='hs-varop'>$</span> <span class='hs-varid'>parse</span> <span class='hs-varid'>s</span>
<a name="line-89"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>a</span><span class='hs-layout'>,</span> <span class='hs-varid'>ss</span><span class='hs-layout'>)</span>
<a name="line-90"></a> <span class='hs-varid'>argName</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>name</span>
<a name="line-91"></a>
<a name="line-92"></a><a name="instance%20Argument%20(Maybe%20a)"></a><span class='hs-comment'>-- |use Maybe when it should be parsed from one or zero (greedily)</span>
<a name="line-93"></a><a name="instance%20Argument%20(Maybe%20a)"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Argument</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-94"></a> <span class='hs-varid'>argName</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"["</span><span class='hs-varop'>++</span><span class='hs-varid'>name</span> <span class='hs-varid'>x</span><span class='hs-varop'>++</span><span class='hs-str'>"]"</span>
<a name="line-95"></a> <span class='hs-varid'>parseArg</span> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>Nothing</span><span class='hs-layout'>,</span> <span class='hs-conid'>[]</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
<a name="line-96"></a> <span class='hs-varid'>parseArg</span> <span class='hs-varid'>ss'</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-varid'>s</span><span class='hs-conop'>:</span><span class='hs-varid'>ss</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>parse</span> <span class='hs-varid'>s</span> <span class='hs-keyword'>of</span>
<a name="line-97"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>Nothing</span><span class='hs-layout'>,</span> <span class='hs-varid'>ss'</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
<a name="line-98"></a> <span class='hs-varid'>justA</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-varid'>justA</span><span class='hs-layout'>,</span> <span class='hs-varid'>ss</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>Nothing</span><span class='hs-layout'>,</span><span class='hs-varid'>ss'</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
<a name="line-99"></a>
<a name="line-100"></a><a name="instance%20Argument%20%5ba%5d"></a><span class='hs-comment'>-- |use a list when it should be parsed from zero or more (greedily)</span>
<a name="line-101"></a><a name="instance%20Argument%20%5ba%5d"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Arguable</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Argument</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>a</span><span class='hs-keyglyph'>]</span> <span class='hs-keyword'>where</span>
<a name="line-102"></a> <span class='hs-varid'>argName</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-conop'>:</span><span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"["</span><span class='hs-varop'>++</span><span class='hs-varid'>name</span> <span class='hs-varid'>x</span> <span class='hs-varop'>++</span><span class='hs-str'>"...]"</span>
<a name="line-103"></a> <span class='hs-varid'>parseArg</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>reverse</span> <span class='hs-varop'>$</span> <span class='hs-varid'>inits</span> <span class='hs-varid'>ss'</span> <span class='hs-varop'>`zip`</span> <span class='hs-varid'>tails</span> <span class='hs-varid'>ss</span>
<a name="line-104"></a> <span class='hs-keyword'>where</span> <span class='hs-varid'>ss'</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>map</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-varid'>takeWhile</span> <span class='hs-varid'>isJust</span> <span class='hs-varop'>$</span> <span class='hs-varid'>map</span> <span class='hs-varid'>parse</span> <span class='hs-varid'>ss</span>
<a name="line-105"></a>
<a name="line-106"></a><a name="NonGreedy"></a><span class='hs-comment'>-- |a wrapper type to indicate a non-greedy list or maybe</span>
<a name="line-107"></a><a name="NonGreedy"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>NonGreedy</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>NonGreedy</span> <span class='hs-layout'>{</span> <span class='hs-varid'>unNonGreedy</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-layout'>}</span> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Show</span><span class='hs-layout'>,</span> <span class='hs-conid'>Eq</span><span class='hs-layout'>)</span>
<a name="line-108"></a><a name="instance%20Argument%20(NonGreedy%20m%20a)"></a><span class='hs-comment'>-- |use NonGreedy when it should be parsed non-greedily</span>
<a name="line-109"></a><a name="instance%20Argument%20(NonGreedy%20m%20a)"></a><span class='hs-comment'>-- (e.g. @(NonGreedy xs :: NonGreedy [] Int, x :: Maybe Float) <- readArgs@)</span>
<a name="line-110"></a><a name="instance%20Argument%20(NonGreedy%20m%20a)"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Argument</span> <span class='hs-layout'>(</span><span class='hs-varid'>m</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Argument</span> <span class='hs-layout'>(</span><span class='hs-conid'>NonGreedy</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-111"></a> <span class='hs-varid'>argName</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-conid'>NonGreedy</span> <span class='hs-varid'>m</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>argName</span> <span class='hs-varid'>m</span>
<a name="line-112"></a> <span class='hs-varid'>parseArg</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>map</span> <span class='hs-layout'>(</span><span class='hs-varid'>first</span> <span class='hs-conid'>NonGreedy</span><span class='hs-layout'>)</span> <span class='hs-varop'>.</span> <span class='hs-varid'>reverse</span> <span class='hs-varop'>.</span> <span class='hs-varid'>parseArg</span>
<a name="line-113"></a>
<a name="line-114"></a><a name="instance%20Argument%20String"></a><span class='hs-comment'>-- |make sure strings are handled as a separate type, not a list of chars</span>
<a name="line-115"></a><a name="instance%20Argument%20String"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Argument</span> <span class='hs-conid'>String</span> <span class='hs-keyword'>where</span>
<a name="line-116"></a> <span class='hs-varid'>parseArg</span> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>[]</span>
<a name="line-117"></a> <span class='hs-varid'>parseArg</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span><span class='hs-conop'>:</span><span class='hs-varid'>ss</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-118"></a> <span class='hs-varid'>a</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>maybeToList</span> <span class='hs-varop'>$</span> <span class='hs-varid'>parse</span> <span class='hs-varid'>s</span>
<a name="line-119"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>a</span><span class='hs-layout'>,</span> <span class='hs-varid'>ss</span><span class='hs-layout'>)</span>
<a name="line-120"></a> <span class='hs-varid'>argName</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>name</span>
<a name="line-121"></a>
<a name="line-122"></a><a name="ArgumentTuple"></a><span class='hs-comment'>-- |a class for tuples of types that can be parsed from the entire list</span>
<a name="line-123"></a><a name="ArgumentTuple"></a><span class='hs-comment'>-- of arguments</span>
<a name="line-124"></a><a name="ArgumentTuple"></a><span class='hs-keyword'>class</span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-varid'>a</span> <span class='hs-keyword'>where</span>
<a name="line-125"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>String</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Maybe</span> <span class='hs-varid'>a</span>
<a name="line-126"></a> <span class='hs-comment'>-- |usageFor's argument will usually be undefined, so when defining instances of</span>
<a name="line-127"></a> <span class='hs-comment'>-- Arguable, it should be lazy in its argument</span>
<a name="line-128"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>String</span>
<a name="line-129"></a>
<a name="line-130"></a><a name="instance%20ArgumentTuple%20()"></a><span class='hs-comment'>-- |use () for no arguments</span>
<a name="line-131"></a><a name="instance%20ArgumentTuple%20()"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-conid'>()</span> <span class='hs-keyword'>where</span>
<a name="line-132"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-conid'>()</span>
<a name="line-133"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Nothing</span>
<a name="line-134"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>const</span> <span class='hs-str'>""</span>
<a name="line-135"></a>
<a name="line-136"></a><span class='hs-comment'>-- |use :& to construct arbitrary length tuples of any parsable arguments</span>
<a name="line-137"></a><span class='hs-keyword'>data</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Show</span><span class='hs-layout'>,</span> <span class='hs-conid'>Eq</span><span class='hs-layout'>)</span>
<a name="line-138"></a><span class='hs-keyword'>infixr</span> <span class='hs-num'>5</span> <span class='hs-conop'>:&</span>
<a name="line-139"></a><a name="instance%20ArgumentTuple%20(a%20:&%20y)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>,</span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-140"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>listToMaybe</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
<a name="line-141"></a> <span class='hs-layout'>(</span><span class='hs-varid'>a</span><span class='hs-layout'>,</span> <span class='hs-varid'>ss'</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArg</span> <span class='hs-varid'>ss</span>
<a name="line-142"></a> <span class='hs-varid'>y</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>maybeToList</span> <span class='hs-varop'>$</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss'</span>
<a name="line-143"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>y</span>
<a name="line-144"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>" "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>argName</span> <span class='hs-varid'>a</span> <span class='hs-varop'>++</span> <span class='hs-varid'>usageFor</span> <span class='hs-varid'>y</span>
<a name="line-145"></a>
<a name="line-146"></a><a name="instance%20ArgumentTuple%20a"></a><span class='hs-comment'>-- Use :& to derive an instance for single arguments</span>
<a name="line-147"></a><a name="instance%20ArgumentTuple%20a"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-varid'>a</span> <span class='hs-keyword'>where</span>
<a name="line-148"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-149"></a> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-150"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>a</span>
<a name="line-151"></a> <span class='hs-varid'>usageFor</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-152"></a>
<a name="line-153"></a><a name="instance%20ArgumentTuple%20(b,a)"></a><span class='hs-comment'>-- Use :& to derive instances for all the normal tuple types</span>
<a name="line-154"></a><a name="instance%20ArgumentTuple%20(b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-155"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-156"></a> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-157"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-158"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-159"></a>
<a name="line-160"></a><a name="instance%20ArgumentTuple%20(c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-161"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-162"></a> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-163"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-164"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-165"></a>
<a name="line-166"></a><a name="instance%20ArgumentTuple%20(d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-167"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-168"></a> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-169"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-170"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-171"></a>
<a name="line-172"></a><a name="instance%20ArgumentTuple%20(e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-173"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-174"></a> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-175"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-176"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-177"></a>
<a name="line-178"></a><a name="instance%20ArgumentTuple%20(f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-179"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-180"></a> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-181"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-182"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-183"></a>
<a name="line-184"></a><a name="instance%20ArgumentTuple%20(g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-185"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-186"></a> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-187"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-188"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-189"></a>
<a name="line-190"></a><a name="instance%20ArgumentTuple%20(h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-191"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-192"></a> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-193"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-194"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-195"></a>
<a name="line-196"></a><a name="instance%20ArgumentTuple%20(i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-197"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-198"></a> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-199"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-200"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-201"></a>
<a name="line-202"></a><a name="instance%20ArgumentTuple%20(j,i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>j</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-203"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-204"></a> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-205"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-206"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-207"></a>
<a name="line-208"></a><a name="instance%20ArgumentTuple%20(k,j,i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>k</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>j</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-209"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-210"></a> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-211"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-212"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-213"></a>
<a name="line-214"></a><a name="instance%20ArgumentTuple%20(l,k,j,i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>l</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>k</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>j</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-215"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-216"></a> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-217"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-218"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-219"></a>
<a name="line-220"></a><a name="instance%20ArgumentTuple%20(m,l,k,j,i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>m</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>l</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>k</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>j</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-221"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-222"></a> <span class='hs-varid'>m</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-223"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-224"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>m</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-225"></a>
<a name="line-226"></a><a name="instance%20ArgumentTuple%20(n,m,l,k,j,i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>n</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>m</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>l</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>k</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>j</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>n</span><span class='hs-layout'>,</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-227"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-228"></a> <span class='hs-varid'>n</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>m</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-229"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>n</span><span class='hs-layout'>,</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-230"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>n</span><span class='hs-layout'>,</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>n</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>m</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-231"></a>
<a name="line-232"></a><a name="instance%20ArgumentTuple%20(o,n,m,l,k,j,i,h,g,f,e,d,c,b,a)"></a><span class='hs-keyword'>instance</span> <span class='hs-layout'>(</span><span class='hs-conid'>Argument</span> <span class='hs-varid'>o</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>n</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>m</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>l</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>k</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>j</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>i</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>h</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>g</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>f</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>e</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>d</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>c</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>b</span><span class='hs-layout'>,</span> <span class='hs-conid'>Argument</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>ArgumentTuple</span> <span class='hs-layout'>(</span><span class='hs-varid'>o</span><span class='hs-layout'>,</span><span class='hs-varid'>n</span><span class='hs-layout'>,</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-233"></a> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-234"></a> <span class='hs-varid'>o</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>n</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>m</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>parseArgsFrom</span> <span class='hs-varid'>ss</span>
<a name="line-235"></a> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-varid'>o</span><span class='hs-layout'>,</span><span class='hs-varid'>n</span><span class='hs-layout'>,</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span>
<a name="line-236"></a> <span class='hs-varid'>usageFor</span> <span class='hs-keyglyph'>~</span><span class='hs-layout'>(</span><span class='hs-varid'>o</span><span class='hs-layout'>,</span><span class='hs-varid'>n</span><span class='hs-layout'>,</span><span class='hs-varid'>m</span><span class='hs-layout'>,</span><span class='hs-varid'>l</span><span class='hs-layout'>,</span><span class='hs-varid'>k</span><span class='hs-layout'>,</span><span class='hs-varid'>j</span><span class='hs-layout'>,</span><span class='hs-varid'>i</span><span class='hs-layout'>,</span><span class='hs-varid'>h</span><span class='hs-layout'>,</span><span class='hs-varid'>g</span><span class='hs-layout'>,</span><span class='hs-varid'>f</span><span class='hs-layout'>,</span><span class='hs-varid'>e</span><span class='hs-layout'>,</span><span class='hs-varid'>d</span><span class='hs-layout'>,</span><span class='hs-varid'>c</span><span class='hs-layout'>,</span><span class='hs-varid'>b</span><span class='hs-layout'>,</span><span class='hs-varid'>a</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>usageFor</span> <span class='hs-layout'>(</span><span class='hs-varid'>o</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>n</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>m</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>l</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>k</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>j</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>h</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>g</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>f</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>e</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>d</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>c</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>b</span> <span class='hs-conop'>:&</span> <span class='hs-varid'>a</span> <span class='hs-conop'>:&</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
</pre></body>
</html>
|