<?xml version="1.0" encoding="utf8" ?>
<%% import System.Time  (getClockTime) %%>
<%% import Text.RegexPR (gsubRegexPR)  %%>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>2. use rule sample</h1>
<p>updated at <%==$ getClockTime %></p>
<h2>2.1. use rule</h2>
<p>You can use suffix rule by 'rule'.</p>
<h2>2.2. sample</h2>

<p>&gt; cat hello.c</p>
<pre><code><%== fmap (flip (foldr (uncurry gsubRegexPR)) [ (">","&gt;"), ("<","&lt;") ]) $
                  readFile "../samples/use_rule/hello.c" %></code></pre>

<p>&gt; cat <a href="../Hakefile_samples/Hakefile_use_rule">Hakefile</a></p>
<pre><code><%== readFile "../samples/use_rule/Hakefile" %></code></pre>

<h2>2.3. FunSetRaw</h2>
<p>You can use FunSetRaw if you like.</p>
<p>&gt; cat <a href="../Hakefile_samples/Hakefile_use_rule_FunSetRaw">Hakefile</a></p>
<pre><code><%== readFile "../samples/use_rule_FunSetRaw/Hakefile" %></code></pre>

<h2>2.4. try</h2>
<pre><code>&gt; hake hello
cc -o hello hello.c
&gt; ./hello
Hello, world!</code></pre>

</body>
</html>
