updated the system to work better with markdown

This commit is contained in:
Yann Esposito 2012-11-20 12:17:25 +01:00
parent d18f1f25b0
commit c6987ee81d
8 changed files with 88 additions and 1 deletions

View file

@ -687,6 +687,34 @@ Haskell types is fractal:</p>
<img src="categories/img/mp/hask-endofunctor.png" alt="Haskell functor representation"/> <img src="categories/img/mp/hask-endofunctor.png" alt="Haskell functor representation"/>
</section> </section>
<section class="slide">
<h2 id="non-haskell-hasks-functors">&quot;Non Haskell&quot; Hask's Functors</h2>
<p>A simple basic example is the \(id_\Hask\) functor. It simply cannot be expressed as a couple (<code>F</code>,<code>fmap</code>) where</p>
<ul>
<li><code>F::* -&gt; *</code></li>
<li><code>fmap :: (a -&gt; b) -&gt; (F a) -&gt; (F b)</code></li>
</ul>
<p>Also other degenerated examples:</p>
<ul>
<li>F(<code>T</code>)=<code>Int</code></li>
<li>F(<code>f</code>)=<code>\x-&gt;0</code></li>
</ul>
</section>
<section class="slide">
<h2 id="also-functor-inside-hask">Also Functor inside \(\Hask\)</h2>
<p><code>length</code> can be seen as a Functor from the category <code>[a]</code> to <code>Int</code>. More precisely:</p>
<ul>
<li>\(\ob{\mathtt{[a]}}=\{∙\}\)</li>
<li>\(\hom{\mathtt{[a]}}=\mathtt{[a]}\)</li>
<li>\(∘=\mathtt{(++)}\)</li>
</ul>
<p><span class="and">&amp;</span></p>
<ul>
<li>\(\ob{\mathtt{Int}}=\{∙\}\)</li>
<li>\(\hom{\mathtt{Int}}=\mathtt{Int}\)</li>
<li>\(∘=\mathtt{(+)}\)</li>
</ul>
</section>
<!-- End slides. --> <!-- End slides. -->

View file

@ -0,0 +1,6 @@
<h2>Functor as boxes</h2>
<p>Haskell functor can be seen as boxes containing all Haskell types and functions.
Haskell types is fractal:</p>
<img src="categories/img/mp/hask-endofunctor-objects.png" alt="Haskell functor representation"/>

View file

@ -0,0 +1,11 @@
<h2 id="non-haskell-hasks-functors">&quot;Non Haskell&quot; Hask's Functors</h2>
<p>A simple basic example is the \(id_\Hask\) functor. It simply cannot be expressed as a couple (<code>F</code>,<code>fmap</code>) where</p>
<ul>
<li><code>F::* -&gt; *</code></li>
<li><code>fmap :: (a -&gt; b) -&gt; (F a) -&gt; (F b)</code></li>
</ul>
<p>Also other degenerated examples:</p>
<ul>
<li>F(<code>T</code>)=<code>Int</code></li>
<li>F(<code>f</code>)=<code>\x-&gt;0</code></li>
</ul>

View file

@ -0,0 +1,12 @@
## "Non Haskell" Hask's Functors
A simple basic example is the \\(id\_\\Hask\\) functor.
It simply cannot be expressed as a couple (`F`,`fmap`) where
- `F::* -> *`
- `fmap :: (a -> b) -> (F a) -> (F b)`
Also other degenerated examples:
- F(`T`)=`Int`
- F(`f`)=`\_->0`

View file

@ -0,0 +1,13 @@
<h2 id="also-functor-inside-hask">Also Functor inside \(\Hask\)</h2>
<p><code>length</code> can be seen as a Functor from the category <code>[a]</code> to <code>Int</code>. More precisely:</p>
<ul>
<li>\(\ob{\mathtt{[a]}}=\{∙\}\)</li>
<li>\(\hom{\mathtt{[a]}}=\mathtt{[a]}\)</li>
<li>\(∘=\mathtt{(++)}\)</li>
</ul>
<p>&amp;</p>
<ul>
<li>\(\ob{\mathtt{Int}}=\{∙\}\)</li>
<li>\(\hom{\mathtt{Int}}=\mathtt{Int}\)</li>
<li>\(∘=\mathtt{(+)}\)</li>
</ul>

View file

@ -0,0 +1,14 @@
## Also Functor inside \\(\\Hask\\)
`length` can be seen as a Functor from the category `[a]` to `Int`.
More precisely:
- \\(\\ob{\\mathtt{[a]}}=\\{∙\\}\\)
- \\(\\hom{\\mathtt{[a]}}=\\mathtt{[a]}\\)
- \\(∘=\\mathtt{(++)}\\)
&
- \\(\\ob{\\mathtt{Int}}=\\{∙\\}\\)
- \\(\\hom{\\mathtt{Int}}=\\mathtt{Int}\\)
- \\(∘=\\mathtt{(+)}\\)

View file

@ -14,7 +14,7 @@ for rep in ??_*(/); do
cd $rep cd $rep
i=10 i=10
for fic in *.html; do for fic in *.html; do
title=$( <$fic grep h2 | sed 's/<[^>]*>//g;s/[^a-zA-Z]/_/g;s/__*/_/g;s/^_//;s/_$//') title=$( <$fic grep h2 | sed 's/<[^>]*>//g;s/&[^;]*;//g;s/[^a-zA-Z]/_/g;s/__*/_/g;s/^_//;s/_$//;')
if ((i<100)); then if ((i<100)); then
num="0$i" num="0$i"
else else
@ -28,6 +28,9 @@ for rep in ??_*(/); do
continue continue
} }
mv $fic $newfic mv $fic $newfic
mdfic=${fic:r}.md
newmdfic=${newfic:r}.md
[[ -e $mdfic ]] && mv $mdfic $newmdfic
done done
cd $scriptdir cd $scriptdir
done done