Safe Haskell | Safe

Nesting

Synopsis

- d :: t
- e :: t
- f :: t
- g :: t
- h :: t
- i :: t
- j :: t
- k :: t

# Documentation

d :: t #

- We can

  - easily go back

    1. some indentation
  - levels

1.     back at the top

e :: t #

- Beginning of list

  - second list
- Some indented list but the presence of this text pushes it out of nesting back to the top.

f :: t #

- Beginning of list

      nested code
          we preserve the space correctly

g :: t #

- Beginning of list

  - Nested list

h :: t #

- Beginning of list

      nested
      bird
      tracks

i :: t #

- Beginning of list This belongs to the list above!

      nested
      bird
      tracks

      another line
        with indentation

      nested bird tracks
        without leading space

  - Next list More of the indented list.

    - Deeper

      - Deeper

        - Even deeper!
        - No newline separation even in indented lists.

j :: t #

All this
  Works for definition lists too.

      nested
      bird
      tracks

  - Next list with more of the indented list content.

    Even more content on a new line.

    1. Different type of list

       1. Deeper

           >>> Here's an example in a list
           example result

       b
         Even deeper!
       c
         No newline separation even in indented lists. We can have any paragraph level element that we normally can, like headers

       ### Level 3 header

       with some content…

       - and even more lists inside

k :: t #

- list may start at arbitrary depth
- and consecutive items at that depth belong to the same list

- of course we can still

  - nest items like we are used to
- and then get back to initial list