<html xmlns="http://www.w3.org/1999/xhtml" ><head ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title >Nesting</title ><link href="#" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript" ></script ><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript" ></script ><script type="text/javascript" >// window.onload = function () {pageLoad();setSynopsis("mini_Nesting.html");}; // </script ></head ><body ><div id="package-header" ><ul class="links" id="page-menu" ><li ><a href="#" >Contents</a ></li ><li ><a href="#" >Index</a ></li ></ul ><p class="caption empty" ></p ></div ><div id="content" ><div id="module-header" ><table class="info" ><tr ><th >Safe Haskell</th ><td >Safe</td ></tr ></table ><p class="caption" >Nesting</p ></div ><div id="synopsis" ><p id="control.syn" class="caption expander" onclick="toggleSection('syn')" >Synopsis</p ><ul id="section.syn" class="hide" onclick="toggleSection('syn')" ><li class="src short" ><a href="#" >d</a > :: t</li ><li class="src short" ><a href="#" >e</a > :: t</li ><li class="src short" ><a href="#" >f</a > :: t</li ><li class="src short" ><a href="#" >g</a > :: t</li ><li class="src short" ><a href="#" >h</a > :: t</li ><li class="src short" ><a href="#" >i</a > :: t</li ><li class="src short" ><a href="#" >j</a > :: t</li ><li class="src short" ><a href="#" >k</a > :: t</li ></ul ></div ><div id="interface" ><h1 >Documentation</h1 ><div class="top" ><p class="src" ><a id="v:d" class="def" >d</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li ><p >We can</p ><ul ><li ><p >easily go back</p ><ol ><li >some indentation</li ></ol ></li ><li >levels</li ></ul ></li ></ul ><ol ><li ><pre >back at the top</pre ></li ></ol ></div ></div ><div class="top" ><p class="src" ><a id="v:e" class="def" >e</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li ><p >Beginning of list</p ><ul ><li >second list</li ></ul ></li ><li >Some indented list but the presence of this text pushes it out of nesting back to the top.</li ></ul ></div ></div ><div class="top" ><p class="src" ><a id="v:f" class="def" >f</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li ><p >Beginning of list</p ><pre >nested code we preserve the space correctly </pre ></li ></ul ></div ></div ><div class="top" ><p class="src" ><a id="v:g" class="def" >g</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li ><p >Beginning of list</p ><ul ><li >Nested list</li ></ul ></li ></ul ></div ></div ><div class="top" ><p class="src" ><a id="v:h" class="def" >h</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li ><p >Beginning of list</p ><pre >nested bird tracks</pre ></li ></ul ></div ></div ><div class="top" ><p class="src" ><a id="v:i" class="def" >i</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li ><p >Beginning of list This belongs to the list above!</p ><pre >nested bird tracks another line with indentation</pre ><pre >nested bird tracks without leading space</pre ><ul ><li ><p >Next list More of the indented list.</p ><ul ><li ><p >Deeper</p ><ul ><li ><p >Deeper</p ><ul ><li >Even deeper!</li ><li >No newline separation even in indented lists.</li ></ul ></li ></ul ></li ></ul ></li ></ul ></li ></ul ></div ></div ><div class="top" ><p class="src" ><a id="v:j" class="def" >j</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><dl ><dt >All this</dt ><dd >Works for definition lists too.<pre >nested bird tracks</pre ><ul ><li ><p >Next list with more of the indented list content.</p ><p >Even more content on a new line.</p ><ol ><li ><p >Different type of list</p ><ol ><li >Deeper</li ></ol ><pre class="screen" ><code class="prompt" >>>> </code ><strong class="userinput" ><code >Here's an example in a list </code ></strong >example result </pre ><dl ><dt >b</dt ><dd >Even deeper!</dd ><dt >c</dt ><dd >No newline separation even in indented lists. We can have any paragraph level element that we normally can, like headers</dd ></dl ><h3 >Level 3 header</h3 ><p >with some content…</p ><ul ><li >and even more lists inside</li ></ul ></li ></ol ></li ></ul ></dd ></dl ></div ></div ><div class="top" ><p class="src" ><a id="v:k" class="def" >k</a > :: t <a href="#" class="selflink" >#</a ></p ><div class="doc" ><ul ><li >list may start at arbitrary depth</li ><li >and consecutive items at that depth belong to the same list</li ><li ><p >of course we can still</p ><ul ><li >nest items like we are used to</li ></ul ></li ><li >and then get back to initial list</li ></ul ></div ></div ></div ></div ><div id="footer" ></div ></body ></html >