<div dir="ltr"><div><div>+1 for concistency.<br><br></div>Also, consider interop with non-haskell environments.  For example showing the documentation of a function in emacs, eclipse, on github, and from a javascript library.<br>

<br>All of these can be engineered around, and tooling can be provided.<br><br>But let me give an example: the other week I was looking for a command-line tool to extract javadoc to display as contextual information in emacs.  There is no such tool.  Javadoc is &quot;java only&quot;.  For me, if I could not hack it up in an hour, it was too much work.  The solution was rather to craft a specific google search, use &quot;I&#39;m feeling lucky&quot;, and extract the subsection containing the documentation for the function.<br>

<br></div>Often the most useful format for documentation is contextual help in an IDE/editor, so don&#39;t forget that use-case.<br><div><br>Alexander<br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Sat, Apr 6, 2013 at 1:04 AM, John MacFarlane <span dir="ltr">&lt;<a href="mailto:jgm@berkeley.edu" target="_blank">jgm@berkeley.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I like markdown and use it all the time.  While I acknowledge the<br>
problems that have been pointed out, markdown has the advantage of being<br>
easily readable &quot;as it is&quot; in the source document, and not looking like<br>
markup.<br>
<br>
But I do want to point out one problem with markdown as a format for<br>
documentation in Haskell files.  Consider:<br>
<br>
----------------------------------------------------<br>
module MyModule<br>
{-<br>
# Introduction<br>
<br>
This is my module<br>
-}<br>
where<br>
import System.Environment<br>
<br>
main = getArgs &gt;&gt;= print<br>
----------------------------------------------------<br>
<br>
Now try to compile with -cpp, and you&#39;ll get an error because of the &#39;#&#39;<br>
in column 1.  &#39;#&#39; in column 1 is common in markdown (and even<br>
indispensible for level 3+ headers).<br>
<br>
One could work around this by disallowing level 3+ headers, by allowing<br>
the headers to be indented, or by introducing new setext-like syntax for<br>
level 3+ headers, but it is a problem for the idea of using a markdown<br>
SUPERset.<br>
<br>
John<br>
<br>
+++ <a href="mailto:dag.odenhall@gmail.com">dag.odenhall@gmail.com</a> [Apr 05 13 21:59 ]:<br>
<div class="im">&gt;    I forgot the mention the craziness with the *significant trailing<br>
&gt;    whitespace*.<br>
&gt;<br>
</div><div><div class="h5">&gt;    On Fri, Apr 5, 2013 at 9:49 PM, [1]<a href="mailto:dag.odenhall@gmail.com">dag.odenhall@gmail.com</a><br>
&gt;    &lt;[2]<a href="mailto:dag.odenhall@gmail.com">dag.odenhall@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;    Personally I think Markdown sucks, although perhaps less than Haddock<br>
&gt;    markup.<br>
&gt;    Still:<br>
&gt;    * No document meta data<br>
&gt;    * No code block meta data like language for syntax highlighting<br>
&gt;    * No tables<br>
&gt;    * No footnotes<br>
&gt;    * HTML fallback is insecure<br>
&gt;    * Confusing syntax (is it []() or ()[] for links?)<br>
&gt;    * Syntax that gets in the way (maybe I don&#39;t want *stars* emphasized)<br>
&gt;    * Above point leads to non-standard dialects like &quot;GitHub Markdown&quot;<br>
&gt;    (no, GitHub doesn&#39;t use markdown)<br>
&gt;    * Not extensible, leading to even more non-standard hacks and<br>
&gt;    work-arounds (GitHub Markdown, Pandoc Markdown, other Markdown<br>
&gt;    libraries have their own incompatible extensions)<br>
&gt;    * Not well suited for web input (e.g. four-space indentation for code<br>
&gt;    blocks), although not that important for Haddock<br>
&gt;    An important thing to note here is that no, Markdown has *not* won<br>
&gt;    because no one is actually using *Markdown*. They&#39;re using their own,<br>
&gt;    custom and incompatible dialects.<br>
&gt;    Only two of the above points apply to reStructuredText (web input and<br>
&gt;    syntax getting in the way), and those particular points don&#39;t apply to<br>
&gt;    Creole. Therefore I tend to advocate Creole for web applications and<br>
&gt;    reStructuredText for documents.<br>
&gt;    On Thu, Apr 4, 2013 at 6:49 PM, Johan Tibell<br>
</div></div><div class="im">&gt;    &lt;[3]<a href="mailto:johan.tibell@gmail.com">johan.tibell@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;      Hi all,<br>
&gt;      Haddock&#39;s current markup language leaves something to be desired<br>
&gt;      once<br>
&gt;      you want to write more serious documentation (e.g. several<br>
&gt;      paragraphs<br>
&gt;      of introductory text at the top of the module doc). Several features<br>
&gt;      are lacking (bold text, links that render as text instead of URLs,<br>
&gt;      inline HTML).<br>
&gt;      I suggest that we implement an alternative haddock syntax that&#39;s a<br>
&gt;      superset of Markdown. It&#39;s a superset in the sense that we still<br>
&gt;      want<br>
&gt;      to support linkifying Haskell identifiers, etc. Modules that want to<br>
&gt;      use the new syntax (which will probably be incompatible with the<br>
&gt;      current syntax) can set:<br>
&gt;      {-# HADDOCK Markdown #-}<br>
&gt;      on top of the source file.<br>
</div>&gt;      Ticket: [4]<a href="http://trac.haskell.org/haddock/ticket/244" target="_blank">http://trac.haskell.org/haddock/ticket/244</a><br>
<div class="im">&gt;      -- Johan<br>
&gt;      _______________________________________________<br>
&gt;      Haskell-Cafe mailing list<br>
</div>&gt;      [5]<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt;      [6]<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
&gt; References<br>
&gt;<br>
&gt;    1. mailto:<a href="mailto:dag.odenhall@gmail.com">dag.odenhall@gmail.com</a><br>
&gt;    2. mailto:<a href="mailto:dag.odenhall@gmail.com">dag.odenhall@gmail.com</a><br>
&gt;    3. mailto:<a href="mailto:johan.tibell@gmail.com">johan.tibell@gmail.com</a><br>
&gt;    4. <a href="http://trac.haskell.org/haddock/ticket/244" target="_blank">http://trac.haskell.org/haddock/ticket/244</a><br>
&gt;    5. mailto:<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt;    6. <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<div class="HOEnZb"><div class="h5"><br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>