name: Int output test
1 2 3,4 1,2,,3,4 1,2,,3,4,,,1,2,,3,4
output: 123
4
1 2
3 4
1 2
3 4

1 2
3 4

EOF

name: Char output test
'a'b 'c"def""hjk""xyz","123" "ab","cd",,"ef","g"
output: abcdefhjkxyz
123
ab cd
ef g

name: raw input mode
,show
input: 1 2
output: "1 2"EOF

name: raw line input mode
show'
input: 1 2
3 4
output: ["1 2","3 4"]EOF

name: args test
show
input1: 1 2
input2: 3 4
output: [[1,2],[3,4]]EOF

name: args test 1.5
show
input1: 1
2
input2: 3
4
output: [[1,2],[3,4]]EOF

name: args test2
show
input1: 1 2
5
input2: 3 4
output: [[[1,2],[5]],[[3,4]]]EOF

name: args test3
show
input1: 1 2
5a
input2: 3 4
output: [["1 2","5a"],["3 4"]]EOF

name: raw line arg mode
show'
input1: 1 2
3 4
input2: 5
output: [["1 2","3 4"],["5"]]EOF

name: raw line arg mode2
show'
input2: 1 2
3 4
output: [["1 2","3 4"]]EOF

name: raw arg mode
,show
input1: 1 2
3 4
input2: 5
output: ["1 2\n3 4","5"]EOF

name: all symbols
"
 `~!@#$%^&*()_-+={[}]\|'\";:,<.>/?" "\n" mpeek len ord sum
output: 34
2128EOF

name: auto input no ops test

input: 1,2
output: EOF

name: nil type output
nil nil J nil Cons
output:

EOF

name: auto input1
show
input: 1  2
output: "1  2"EOF

name: auto input2
show
input: 1-2
output: "1-2"EOF

name: auto input3
show
input: 1 -2
output: [1,-2]EOF

name: auto input4
show
input: 1 --2
output: "1 --2"EOF

name: empty input
show "\n" $ type
output: []
[]EOF

name: nearly empty input
show
input:

output: ""EOF

name: auto input6
show
input: ,
output: ","EOF

name: auto input7
show
input: 1

2
output: [[1],[],[2]]EOF

name: auto input8
show
input: 1


output: [[1],[]]EOF

name: auto input9
show
input: 1,2,
output: [1,2]EOF

name: auto input10
show
input:

output: ""EOF

name: implicit set, no input
5> +*
output: 50EOF

name: implicit set, input present
5> +*
input: 2
output: 35EOF

name: implicit set, $
5> $
output: 55EOF

name: implicit set, $, input
5>+++$
input: 100
output: 210EOF

name: implicit used in main
5++
input: 100
output: 205EOF

name: implicit used in fn
3;+ a
output: 6
3

name: implicit used in fn with input present
3*;+ a
input: 5
output: 30
15

name: $ is implicit in main used in fn with no input
$ 3;+ a
output: 6
3

name: implicit value used before set
* 5>+
output: 30EOF

name: test wrapped set implicit in a way where index changes on parse passes
i)>2 k e)> 3k 5>
output: 5
6
1
2
3
5EOF

name: implicit set with >,
5 countTo meld + ) >, $
output: 1616EOF

name: input op
input
input: 5
output: 5EOF

name: implicit op
implicit
input: 5
output: 5EOF

name: W breaks ghc 8.0.2 with type annotations
W
output: EOF

name: E H breaks ghc without type annotations
E H
output: EOF

name: v
v
input: ab
output: abEOF

name: test nil input promote
H nil Q
output: 1EOF

name: error
5~sqrt
output: ERROR: negative square rootEOF

name: bracket matching1
# these are easiest to test by erroring to see matches
meld 2 iterate countTo + >, ;
output: ERROR: 2:29 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
meld 2 iterate countTo + >, ;
  \       \           /  /  ?
   \       \         /  /
    \       \       /  /
     \       \     /  /
      \       \   /  /
       \       \ /  /
        \       \  /
         \     / \/
          \   /
           \ /EOF

name: bracket matching2
5 countTo meld + ) >, $ ;
output: ERROR: 1:25 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
5 countTo meld + ) >, $ ;
            \ /     ?   ?EOF

name: bm3
iiii>>>>i)> ;
output: ERROR: 1:13 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
implicit i i i i > > > > i ) > ;
         \ \ \ \/ / / /  \  /  ?
          \ \ \  / / /    \/
           \ \ \/ / /
            \ \  / /
             \ \/ /
              \  /
               \/EOF

name: bm4
m1,2+>i))> ;
output: ERROR: 1:12 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
m 1,2 + > i ) ) > ;
\      /  \    /  ?
 \    /    \  /
  \  /      \/
   \/EOF

name: bm5
i ) > ) > ;
output: ERROR: 1:11 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
implicit i ) > ) > ;
         \   ?  /  ?
          \    /
           \  /
            \/EOF

name: bm6
m 1,2+ i ) > ;
output: ERROR: 1:14 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
m 1,2 + i ) > ;
\       \/ /  ?
 \        /
  \      /
   \    /
    \  /
     \/EOF

name: bm7 >, unneeded
m 1,2+ 4>,
output: ERROR: 1:9 (>,) found >, but this end bracket already didn't match a loop op so that `,` is unnecessaryEOF

name: bm8 >, to set implicit
m 1,2,3+ >, " " $)
output: 6 7EOF

name: bm9, multiple >,s
5 i 5+ i m 1,2+ + > + >, >, ;
output: ERROR: 1:29 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
implicit 5 i 5 + i m 1,2 + + > + >, >, ;
           \     \ \        /    /  /  ?
            \     \ \      /    /  /
             \     \ \    /    /  /
              \     \ \  /    /  /
               \     \ \/    /  /
                \     \/\   /  /
                 \    /\ \ /  /
                  \  /  \    /
                   \/    \  /
                          \/EOF

name: bm10, multiple commas
5 i m 1,2+ m 1,2+) ++ >,, ;
output: ERROR: 1:27 (;) unterminated function (stack is never rid of extra values again, functions can only return one value)
5 i m 1,2 + m 1,2 + ) + + >,, ;
  \ \    /  \          /  /   ?
   \ \  /    \        /  /
    \ \/      \      /  /
     \         \    /  /
      \         \  /  /
       \         \/  /
        \        /\ /
         \      /
          \    /
           \  /
            \/EOF
