Visualize Church numerals
Retina, 74 67 63 bytes

Byte count assumes ISO 8859-1 encoding.

.
 |  
^
$.'$*----¶
\z
¶$` |
+`(.+\|) .+$
$&amp;¶$1----
$
¶ |
  ¶
¶


Input is in unary, using any character except linefeeds as the digit.

Try it online!

Explanation

.
 |  


We start by turning each unary digit into  |   (note the trailing spaces). This gives us the second line of the output (plus two trailing spaces if the input is at least 1).

^
$.'$*----¶


We match the beginning of the string in order to prepend the first line. This is done using some Retina-specific substitution features. $* repeats the character on the right as many times as its left arugment. $.' evaluates the number of characters to the right of the match. Since the match is only the beginning of the string this gives as many - as there are characters in the string and --- appends three more. The ¶ is an alias for a linefeed. So now we've got the first two lines.

\z
¶$` |


Now we append the next two lines. We do this by matching the end of the string and appending a linefeed, the entire string again and then  | to get the fourth line right.

+`(.+\|) .+$
$&amp;¶$1----


Time for the applications. The leading + makes Retina repeat this stage until the output stops changing (in this case because the regex no long matches). The regex matches the entire last line, provided it contains a | follows by a space. We capture everything up to the | (which will be the second to last) in group 1. We write the line back with $&amp;, a linefeed, then group 1 (thereby dropping the last |) and then ----.

$
¶ |


This just adds the final line containing only a single |.

  ¶
¶


Finally we need to get rid of the trailing spaces on the second line.