diff --git a/src/Visp.Compiler/Syntax/SynWriter.fs b/src/Visp.Compiler/Syntax/SynWriter.fs index d38a13d..8e32eee 100644 --- a/src/Visp.Compiler/Syntax/SynWriter.fs +++ b/src/Visp.Compiler/Syntax/SynWriter.fs @@ -1216,7 +1216,7 @@ module Write = if kind = CollectionKind.HashBrace then writeExprToValue else - writeExpr + writeExprInParens let items = if kind = CollectionKind.FsList then @@ -1475,10 +1475,22 @@ module Write = () and private writeExprInParens w (st: WriteState) ex = - // TODO: Should we check if we have a tuple and then not add parens? - char w '(' + let needsParens = + match ex with + | SynExpr.Const _ + | SynExpr.Tuple _ + | SynExpr.Literal _ + | SynExpr.Symbol _ -> false + + | _ -> true + + if needsParens then + char w '(' + writeExpr w st ex - char w ')' + + if needsParens then + char w ')' and private writeOp w (st: WriteState) (op: SynOp) = let opState = WriteState.Inline diff --git a/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.Can output basic program.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.Can output basic program.verified.txt index 3ee2d3a..f9a40ec 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.Can output basic program.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.Can output basic program.verified.txt @@ -8,8 +8,8 @@ let state = { Todo = () } // line 4 @"test" let hello (name: string) = // line 6 @"test" - printfn ("hello %s") (name) + printfn "hello %s" name // line 8 @"test" -hello ("world") +hello "world" diff --git a/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.New writer can output basic program.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.New writer can output basic program.verified.txt index ee962b6..0566fad 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.New writer can output basic program.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/WriterTests.New writer can output basic program.verified.txt @@ -8,8 +8,8 @@ let state = { Todo = () } // line 4 @"test" let hello (name: string) = // line 6 @"test" - sprintf ("hello %s") (name) + sprintf "hello %s" name // line 8 @"test" -hello ("world") +hello "world" diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array-0.can parse.verified.txt index 367371d..c7b8cfb 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array-0.can parse.verified.txt @@ -10,11 +10,11 @@ let arr = // line 8 @"array-0.visp" [|1;2;3;4;5|] // line 10 @"array-0.visp" -printfn ("arr[0] %A") ((arr.[0])) +printfn "arr[0] %A" ((arr.[0])) // line 11 @"array-0.visp" -printfn ("arr[1] %A") ((arr.[1])) +printfn "arr[1] %A" ((arr.[1])) // line 13 @"array-0.visp" let visp_result_todo = arr // line 13 @"array-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-0.can parse.verified.txt index 2681ff0..613dc2c 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-0.can parse.verified.txt @@ -10,15 +10,15 @@ type Grid = char[,] // line 10 @"array2d-0.visp" let arr = // line 10 @"array2d-0.visp" - Array2D.create (5) (5) ('.') + Array2D.create 5 5 '.' // line 12 @"array2d-0.visp" let y = 4 // line 14 @"array2d-0.visp" -printfn ("arr[0,0]=%A") ((arr.[0, 0])) +printfn "arr[0,0]=%A" ((arr.[0, 0])) // line 15 @"array2d-0.visp" -printfn ("arr[1,2]=%A") ((arr.[1, 1])) +printfn "arr[1,2]=%A" ((arr.[1, 1])) // line 16 @"array2d-0.visp" -printfn ("arr[3,3]=%A") (Array2D.get (arr) (3) (3)) +printfn "arr[3,3]=%A" (Array2D.get arr 3 3) // line 18 @"array2d-0.visp" arr.[2, 2] <- '#' // line 19 @"array2d-0.visp" @@ -26,23 +26,23 @@ arr.[3, 4] <- '#' // line 20 @"array2d-0.visp" arr.[4, 4] <- '#' // line 21 @"array2d-0.visp" -printfn ("arr[3,4]=%A") (arr +printfn "arr[3,4]=%A" (arr |> (fun a1 -> // line 21 @"array2d-0.visp" - (a1.[y - 1, (1) + - (1) + - (1) + - (1)]))) + (a1.[y - 1, 1 + + 1 + + 1 + + 1]))) // line 22 @"array2d-0.visp" -printfn ("arr[4,4]=%A") (arr +printfn "arr[4,4]=%A" (arr |> (fun a1 -> // line 22 @"array2d-0.visp" - (a1.[y, (1) + - (1) + - (1) + - (1)]))) + (a1.[y, 1 + + 1 + + 1 + + 1]))) // line 25 @"array2d-0.visp" let visp_result_todo = arr // line 25 @"array2d-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-1.can parse.verified.txt index 7552e67..7aaef61 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_arrays_array2d-1.can parse.verified.txt @@ -10,13 +10,13 @@ type Grid = char[,] // line 10 @"array2d-1.visp" let arr = // line 10 @"array2d-1.visp" - Array2D.create (5) (5) ('.') + Array2D.create 5 5 '.' // line 12 @"array2d-1.visp" -printfn ("arr[*,0]=%A") ((arr.[*, 0])) +printfn "arr[*,0]=%A" ((arr.[*, 0])) // line 13 @"array2d-1.visp" -printfn ("arr[0,*]=%A") ((arr.[0, *])) +printfn "arr[0,*]=%A" ((arr.[0, *])) // line 15 @"array2d-1.visp" let visp_result_todo = arr // line 15 @"array2d-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_atom_atom-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_atom_atom-0.can parse.verified.txt index c855d62..2b8178c 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_atom_atom-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_atom_atom-0.can parse.verified.txt @@ -10,21 +10,21 @@ let state = { Todo = () } // line 11 @"atom-0.visp" let inc (v: Value) = // line 12 @"atom-0.visp" - Value.from ((1L) + - (unwrapInt (v))) + Value.from (1L + + (unwrapInt v)) // line 13 @"atom-0.visp" let count = // line 13 @"atom-0.visp" Value.atom(Value.from(0L)) // line 15 @"atom-0.visp" -printfn ("count is %O") (deref (count)) +printfn "count is %O" (deref (count)) // line 17 @"atom-0.visp" CoreMethods.``swap!``(Value.from(count), inc) // line 19 @"atom-0.visp" let visp_result_todo = // line 19 @"atom-0.visp" - printfn ("count is %O") (deref (count)) + printfn "count is %O" (deref (count)) // line 19 @"atom-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_attributes_attributes-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_attributes_attributes-0.can parse.verified.txt index 26a52cc..4b11c8f 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_attributes_attributes-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_attributes_attributes-0.can parse.verified.txt @@ -16,9 +16,9 @@ let xx = // line 13 @"attributes-0.visp" (new TestStruct(99)) // line 15 @"attributes-0.visp" -printfn ("Value is %i") ((xx.Value)) +printfn "Value is %i" ((xx.Value)) // line 17 @"attributes-0.visp" let visp_result_todo = () // line 17 @"attributes-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_cond-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_cond-0.can parse.verified.txt index 0fc0010..b3bb607 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_cond-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_cond-0.can parse.verified.txt @@ -26,7 +26,7 @@ let visp_result_todo = 3 else // line 8 @"cond-0.visp" - failwith ("unreachable cond") + failwith "unreachable cond" // line 8 @"cond-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-0.can parse.verified.txt index 97c6676..554ca38 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-0.can parse.verified.txt @@ -12,5 +12,5 @@ let visp_result_todo = |> (fun arg -> arg) // line 7 @"thread-first-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-1.can parse.verified.txt index 4cf8ad6..ff594db 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-first-1.can parse.verified.txt @@ -18,8 +18,8 @@ let visp_result_todo = arg) |> (fun arg -> // line 15 @"thread-first-1.visp" - printfn ("arg is %O") (arg) + printfn "arg is %O" arg arg) // line 11 @"thread-first-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-last-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-last-0.can parse.verified.txt index 2a0c56e..307f860 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-last-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_builtin-macros_thread-last-0.can parse.verified.txt @@ -17,17 +17,17 @@ let ms = // line 11 @"thread-last-0.visp" rx.Match("Game 1:") // line 13 @"thread-last-0.visp" -printfn ("Groups %A") ((ms.Groups)) +printfn "Groups %A" ((ms.Groups)) // line 15 @"thread-last-0.visp" let gamePrefix = // line 15 @"thread-last-0.visp" ((ms.Groups).[0]) // line 17 @"thread-last-0.visp" -printfn ("Game Prefix %A") (gamePrefix) +printfn "Game Prefix %A" gamePrefix // line 19 @"thread-last-0.visp" let visp_result_todo = // line 19 @"thread-last-0.visp" - printfn ("Game Prefix %A") (ms + printfn "Game Prefix %A" (ms |> (fun a1 -> // line 19 @"thread-last-0.visp" (a1.Groups)) @@ -35,5 +35,5 @@ let visp_result_todo = // line 19 @"thread-last-0.visp" (a1.[0]))) // line 19 @"thread-last-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-0.can parse.verified.txt index c924180..eff5865 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-0.can parse.verified.txt @@ -10,13 +10,13 @@ let visp_result_todo = // line 8 @"cexpr-0.visp" for x in seq { // line 9 @"cexpr-0.visp" - yield (1) + yield 1 // line 10 @"cexpr-0.visp" - yield (2) + yield 2 // line 11 @"cexpr-0.visp" - yield (3)} do + yield 3} do // line 12 @"cexpr-0.visp" - printfn ("x is %i") (x) + printfn "x is %i" x // line 8 @"cexpr-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-1.can parse.verified.txt index b1c87b3..0c9b98c 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_cexpr_cexpr-1.can parse.verified.txt @@ -15,9 +15,9 @@ let SomeTaskCode (cancellationToken: CancellationToken) = // line 12 @"cexpr-1.visp" cancellationToken.ThrowIfCancellationRequested() // line 13 @"cexpr-1.visp" - printfn ("continuing...") + printfn "continuing..." // line 14 @"cexpr-1.visp" - return (1)} + return 1} // line 17 @"cexpr-1.visp" let visp_result_todo = @@ -26,5 +26,5 @@ let visp_result_todo = |> Async.AwaitTask |> Async.RunSynchronously // line 17 @"cexpr-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-0.can parse.verified.txt index 6d13d51..6c47c61 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-0.can parse.verified.txt @@ -6,19 +6,19 @@ open Visp.Runtime.Library let state = { Todo = () } // line 8 @"char-0.visp" -printfn ("Char is %O") ('h') +printfn "Char is %O" 'h' // line 9 @"char-0.visp" -printfn ("Char is %O") ('a') +printfn "Char is %O" 'a' // line 10 @"char-0.visp" -printfn ("Char is %O") ('a') +printfn "Char is %O" 'a' // line 12 @"char-0.visp" -printfn ("Char is %O") (':') +printfn "Char is %O" ':' // line 13 @"char-0.visp" -printfn ("Char is %O") ('(') +printfn "Char is %O" '(' // line 14 @"char-0.visp" let visp_result_todo = // line 14 @"char-0.visp" - printfn ("Char is %O") (')') + printfn "Char is %O" ')' // line 14 @"char-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-1.can parse.verified.txt index 2add15a..8628494 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-1.can parse.verified.txt @@ -6,13 +6,13 @@ open Visp.Runtime.Library let state = { Todo = () } // line 8 @"char-1.visp" -printfn ("Char is '%03o'") (int ('\n')) +printfn "Char is '%03o'" (int '\n') // line 9 @"char-1.visp" -printfn ("Char is '%03o'") (int ('\r')) +printfn "Char is '%03o'" (int '\r') // line 10 @"char-1.visp" let visp_result_todo = // line 10 @"char-1.visp" - printfn ("Char is '%03o'") (int ('\t')) + printfn "Char is '%03o'" (int '\t') // line 10 @"char-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-2.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-2.can parse.verified.txt index e16c301..afecd17 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-2.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_chars_char-2.can parse.verified.txt @@ -8,7 +8,7 @@ let state = { Todo = () } // line 9 @"char-2.visp" let visp_result_todo = // line 9 @"char-2.visp" - printfn ("Chars are %A") (('=', '|', '<', '>')) + printfn "Chars are %A" ('=', '|', '<', '>') // line 9 @"char-2.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_dot_dot-shorthands.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_dot_dot-shorthands.can parse.verified.txt index f415c3f..48e587d 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_dot_dot-shorthands.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_dot_dot-shorthands.can parse.verified.txt @@ -17,17 +17,17 @@ let mutable vec = temp.Add(Value.from(6)) temp // line 10 @"dot-shorthands.visp" -vec.[1] <- Value.int (-1) +vec.[1] <- Value.int -1 // line 12 @"dot-shorthands.visp" -printfn ("%O") ((vec.[1])) +printfn "%O" ((vec.[1])) // line 13 @"dot-shorthands.visp" -printfn ("%O") ((System.Int64.MaxValue)) +printfn "%O" ((System.Int64.MaxValue)) // line 15 @"dot-shorthands.visp" -vec.Add(Value.int (64)) +vec.Add(Value.int 64) // line 17 @"dot-shorthands.visp" let visp_result_todo = // line 17 @"dot-shorthands.visp" - printfn ("%O") ((vec.[(vec.Count) - 1])) + printfn "%O" ((vec.[(vec.Count) - 1])) // line 17 @"dot-shorthands.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-0.can parse.verified.txt index 569c91d..4d93b90 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-0.can parse.verified.txt @@ -8,12 +8,12 @@ let state = { Todo = () } // line 10 @"example-0.visp" let hello (name: string) = // line 12 @"example-0.visp" - printfn ("hello %s") (name) + printfn "hello %s" name // line 14 @"example-0.visp" let visp_result_todo = // line 14 @"example-0.visp" - hello ("world") + hello "world" // line 14 @"example-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-1.can parse.verified.txt index cbadae0..771668e 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-1.can parse.verified.txt @@ -8,39 +8,39 @@ let state = { Todo = () } // line 10 @"example-1.visp" let hello (name: string) = // line 12 @"example-1.visp" - printfn ("hello %s") (name) + printfn "hello %s" name // line 16 @"example-1.visp" let ``hello-no-types`` name = // line 17 @"example-1.visp" - printfn ("hello %s") (name) + printfn "hello %s" name // line 20 @"example-1.visp" let ``hello-with-vector`` (name: string) = // line 21 @"example-1.visp" - printfn ("hello %s") (name) + printfn "hello %s" name // line 24 @"example-1.visp" let anon = // line 24 @"example-1.visp" (fun name -> // line 24 @"example-1.visp" - printfn ("hello %s") (name)) + printfn "hello %s" name) // line 26 @"example-1.visp" -hello ("test") +hello "test" // line 27 @"example-1.visp" -``hello-no-types`` ("no types") +``hello-no-types`` "no types" // line 28 @"example-1.visp" -``hello-with-vector`` ("vector") +``hello-with-vector`` "vector" // line 29 @"example-1.visp" -anon ("anon") +anon "anon" // line 31 @"example-1.visp" let visp_result_todo = // line 31 @"example-1.visp" // line 31 @"example-1.visp" (fun name -> // line 32 @"example-1.visp" - printfn ("hello %s") (name)) ("lambda") + printfn "hello %s" name) "lambda" // line 31 @"example-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-10.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-10.can parse.verified.txt index 01282da..4880cfd 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-10.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-10.can parse.verified.txt @@ -21,7 +21,7 @@ sb.Append("world") // line 18 @"example-10.visp" let visp_result_todo = // line 18 @"example-10.visp" - printfn ("sb contains: %s") ((sb.ToString())) + printfn "sb contains: %s" ((sb.ToString())) // line 18 @"example-10.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-11.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-11.can parse.verified.txt index a3e3060..582217c 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-11.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-11.can parse.verified.txt @@ -6,15 +6,15 @@ open Visp.Runtime.Library let state = { Todo = () } // line 8 @"example-11.visp" -printfn ("this is in the default top-level module") +printfn "this is in the default top-level module" // line 10 @"example-11.visp" module MyCustomModule = // line 11 @"example-11.visp" - printfn ("this is inside MyCustomModule") + printfn "this is inside MyCustomModule" // line 12 @"example-11.visp" let hello () = // line 13 @"example-11.visp" - printfn ("hello world") + printfn "hello world" // line 15 @"example-11.visp" hello () @@ -22,7 +22,7 @@ module MyCustomModule = // line 18 @"example-11.visp" let visp_result_todo = // line 18 @"example-11.visp" - printfn ("this is back in the top-level-module") + printfn "this is back in the top-level-module" // line 18 @"example-11.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-12.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-12.can parse.verified.txt index 66dd61d..e8d10c0 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-12.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-12.can parse.verified.txt @@ -10,7 +10,7 @@ let quoted = // line 9 @"example-12.visp" Value.from([Value.symbol("hello");Value.symbol("world");Value.symbol("in");Value.symbol("quotes")]) // line 11 @"example-12.visp" -printfn ("quoted is: %O") (quoted) +printfn "quoted is: %O" quoted // line 13 @"example-12.visp" let next_quoted = // line 13 @"example-12.visp" @@ -18,7 +18,7 @@ let next_quoted = // line 16 @"example-12.visp" let visp_result_todo = // line 16 @"example-12.visp" - printfn ("next_quoted is: %O") (next_quoted) + printfn "next_quoted is: %O" next_quoted // line 16 @"example-12.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-13.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-13.can parse.verified.txt index 41773b9..82a8290 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-13.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-13.can parse.verified.txt @@ -10,7 +10,7 @@ let quasiquoted = // line 9 @"example-13.visp" Value.from ((Value.symbol("hello"))::((Value.symbol("world"))::((Value.symbol("in"))::((Value.symbol("quotes"))::([]))))) // line 11 @"example-13.visp" -printfn ("quasiquoted is: %O") (quasiquoted) +printfn "quasiquoted is: %O" quasiquoted // line 13 @"example-13.visp" let next_quasiquoted = // line 13 @"example-13.visp" @@ -18,7 +18,7 @@ let next_quasiquoted = // line 16 @"example-13.visp" let visp_result_todo = // line 16 @"example-13.visp" - printfn ("next_quasiquoted is: %O") (next_quasiquoted) + printfn "next_quasiquoted is: %O" next_quasiquoted // line 16 @"example-13.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-14.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-14.can parse.verified.txt index 34eb767..66d82b7 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-14.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-14.can parse.verified.txt @@ -10,9 +10,9 @@ let value = "hello" // line 10 @"example-14.visp" let result = // line 10 @"example-14.visp" - Value.from (Value.from (value)) + Value.from (Value.from value) // line 12 @"example-14.visp" -printfn ("value is %O") (result) +printfn "value is %O" result // line 15 @"example-14.visp" let items = // line 15 @"example-14.visp" @@ -22,15 +22,15 @@ let result2 = // line 18 @"example-14.visp" Value.from ((Value.from(1))::((Value.from(2))::((Value.from (CoreMethods.``add``(3, 4)))::([])))) // line 20 @"example-14.visp" -printfn ("result2 is %O") (result2) +printfn "result2 is %O" result2 // line 22 @"example-14.visp" let result3 = // line 22 @"example-14.visp" - Value.from ((Value.from(0))::((unwrapList (items))@((Value.from(6))::([])))) + Value.from ((Value.from(0))::((unwrapList items)@((Value.from(6))::([])))) // line 24 @"example-14.visp" let visp_result_todo = // line 24 @"example-14.visp" - printfn ("result3 is %O") (result3) + printfn "result3 is %O" result3 // line 24 @"example-14.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-15.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-15.can parse.verified.txt index 9818b4c..b5b41a7 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-15.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-15.can parse.verified.txt @@ -14,14 +14,14 @@ let visp_result_todo = // line 9 @"example-15.visp" let second_capture = // line 9 @"example-15.visp" - (captured_arg) + - (1) + captured_arg + + 1 // line 10 @"example-15.visp" // line 10 @"example-15.visp" (fun () -> // line 10 @"example-15.visp" - (captured_arg) + - (second_capture)) ())) (99) + captured_arg + + second_capture) ())) 99 // line 8 @"example-15.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-16.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-16.can parse.verified.txt index bb157d5..d9e398a 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-16.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-16.can parse.verified.txt @@ -25,8 +25,8 @@ let visp_result_todo = // line 15 @"example-16.visp" (fun () -> // line 15 @"example-16.visp" - (captured_variable) + - (1)) + captured_variable + + 1) // line 16 @"example-16.visp" third_fun ())) // line 18 @"example-16.visp" @@ -34,5 +34,5 @@ let visp_result_todo = // line 21 @"example-16.visp" CoreMethods.``str``(state, Value.from(first_fun ()))) // line 8 @"example-16.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-17.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-17.can parse.verified.txt index 04205bb..3092d25 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-17.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-17.can parse.verified.txt @@ -15,7 +15,7 @@ let visp_result_todo = // line 10 @"example-17.visp" let banaani = "banaani" // line 12 @"example-17.visp" - sprintf ("%s %s %s") (hello) (world) (banaani)) + sprintf "%s %s %s" hello world banaani) // line 8 @"example-17.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-2.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-2.can parse.verified.txt index 7a53adc..ab6dc3e 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-2.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-2.can parse.verified.txt @@ -10,12 +10,12 @@ let hello argname = // line 12 @"example-2.visp" let name = argname // line 13 @"example-2.visp" - printfn ("hello %s") (name) + printfn "hello %s" name // line 15 @"example-2.visp" let visp_result_todo = // line 15 @"example-2.visp" - hello ("world") + hello "world" // line 15 @"example-2.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-3.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-3.can parse.verified.txt index a84b959..daf1430 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-3.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-3.can parse.verified.txt @@ -8,13 +8,13 @@ let state = { Todo = () } // line 8 @"example-3.visp" let mutable value = "initial" // line 9 @"example-3.visp" -printfn ("value is %s") (value) +printfn "value is %s" value // line 10 @"example-3.visp" value <- "updated" // line 11 @"example-3.visp" let visp_result_todo = // line 11 @"example-3.visp" - printfn ("value is %s") (value) + printfn "value is %s" value // line 11 @"example-3.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-4.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-4.can parse.verified.txt index 13df4c2..4d561b7 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-4.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-4.can parse.verified.txt @@ -8,7 +8,7 @@ let state = { Todo = () } // line 9 @"example-4.visp" let mutable value = "initial" // line 10 @"example-4.visp" -printfn ("value is %s") (value) +printfn "value is %s" value // line 12 @"example-4.visp" let foo = // line 12 @"example-4.visp" @@ -16,15 +16,15 @@ let foo = // line 12 @"example-4.visp" value <- arg) // line 14 @"example-4.visp" -foo ("hello") +foo "hello" // line 15 @"example-4.visp" -printfn ("value is %s") (value) +printfn "value is %s" value // line 17 @"example-4.visp" -foo ("world") +foo "world" // line 18 @"example-4.visp" let visp_result_todo = // line 18 @"example-4.visp" - printfn ("value is %s") (value) + printfn "value is %s" value // line 18 @"example-4.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-5.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-5.can parse.verified.txt index 3b751dc..c34fc64 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-5.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-5.can parse.verified.txt @@ -10,37 +10,37 @@ let a = 5 // line 9 @"example-5.visp" let b = 4 // line 11 @"example-5.visp" -printfn ("+ is %i") ((a) + -(b) + -(52)) +printfn "+ is %i" (a + +b + +52) // line 12 @"example-5.visp" -printfn ("+ is %i") (0) +printfn "+ is %i" (0) // line 13 @"example-5.visp" -printfn ("+ is %i") (2) +printfn "+ is %i" (2) // line 15 @"example-5.visp" -printfn ("* is %i") (a * b * 52) +printfn "* is %i" (a * b * 52) // line 16 @"example-5.visp" -printfn ("* is %i") (2) +printfn "* is %i" (2) // line 17 @"example-5.visp" -printfn ("* is %i") (LanguagePrimitives.GenericOne) +printfn "* is %i" (LanguagePrimitives.GenericOne) // line 18 @"example-5.visp" -printfn ("* is %A") (2y * 1y) +printfn "* is %A" (2y * 1y) // line 20 @"example-5.visp" -printfn ("- is %i") (a - b - 52) +printfn "- is %i" (a - b - 52) // line 21 @"example-5.visp" -printfn ("- is %i") (-2) +printfn "- is %i" (-2) // line 23 @"example-5.visp" -printfn ("/ is %A") ((a) / (b) / (52)) +printfn "/ is %A" (a / b / 52) // line 24 @"example-5.visp" -printfn ("/ is %A") (LanguagePrimitives.GenericOne / (2L)) +printfn "/ is %A" (LanguagePrimitives.GenericOne / 2L) // line 26 @"example-5.visp" -printfn ("/ is %A") ((decimal (a)) / (decimal (b)) / (decimal (52))) +printfn "/ is %A" ((decimal a) / (decimal b) / (decimal 52)) // line 27 @"example-5.visp" -printfn ("/ is %A") (LanguagePrimitives.GenericOne / (2)) +printfn "/ is %A" (LanguagePrimitives.GenericOne / 2) // line 28 @"example-5.visp" let visp_result_todo = // line 28 @"example-5.visp" - printfn ("/ is %A") ((decimal (a)) / (decimal (b)) / (52.0M)) + printfn "/ is %A" ((decimal a) / (decimal b) / 52.0M) // line 28 @"example-5.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-6.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-6.can parse.verified.txt index 3de80c7..8e7ff60 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-6.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-6.can parse.verified.txt @@ -17,7 +17,7 @@ let values = // line 10 @"example-6.visp" let visp_result_todo = // line 10 @"example-6.visp" - printfn ("values are %O") (values) + printfn "values are %O" values // line 10 @"example-6.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-7.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-7.can parse.verified.txt index 0ac1ff6..809badf 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-7.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-7.can parse.verified.txt @@ -17,13 +17,13 @@ let values = temp.Add(Value.from("bar")) temp // line 14 @"example-7.visp" -printfn ("values are %O") (values) +printfn "values are %O" values // line 15 @"example-7.visp" CoreMethods.``vector-push!``(state, Value.from(values), Value.from(4), Value.from(5), Value.from(6), Value.from(7)) // line 16 @"example-7.visp" let visp_result_todo = // line 16 @"example-7.visp" - printfn ("values after update are %O") (values) + printfn "values after update are %O" values // line 16 @"example-7.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-8.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-8.can parse.verified.txt index ca2d0c0..52a4a95 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-8.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-8.can parse.verified.txt @@ -12,13 +12,13 @@ let (ints: ResizeArray) = // line 12 @"example-8.visp" ints.Add(1) // line 14 @"example-8.visp" -printfn ("number of ints: %i") ((ints.Count)) +printfn "number of ints: %i" ((ints.Count)) // line 16 @"example-8.visp" ints.Add(2) // line 18 @"example-8.visp" let visp_result_todo = // line 18 @"example-8.visp" - printfn ("number of ints: %i") ((ints.Count)) + printfn "number of ints: %i" ((ints.Count)) // line 18 @"example-8.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-9.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-9.can parse.verified.txt index 93d1640..a96c16a 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-9.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_example-9.can parse.verified.txt @@ -10,21 +10,21 @@ let decimals = // line 9 @"example-9.visp" (new ResizeArray<_>()) // line 11 @"example-9.visp" -decimals.Add(decimal (1)) +decimals.Add(decimal 1) // line 13 @"example-9.visp" -printfn ("number of decimals: %i") ((decimals.Count)) +printfn "number of decimals: %i" ((decimals.Count)) // line 15 @"example-9.visp" -decimals.Add(decimal (2)) +decimals.Add(decimal 2) // line 17 @"example-9.visp" -printfn ("number of decimals: %i") ((decimals.Count)) +printfn "number of decimals: %i" ((decimals.Count)) // line 19 @"example-9.visp" -printfn ("decimals 0 is %f") ((decimals.[0])) +printfn "decimals 0 is %f" ((decimals.[0])) // line 21 @"example-9.visp" let index = 1 // line 23 @"example-9.visp" let visp_result_todo = // line 23 @"example-9.visp" - printfn ("decimals 1 is %f") ((decimals.[index])) + printfn "decimals 1 is %f" ((decimals.[index])) // line 23 @"example-9.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_variables-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_variables-0.can parse.verified.txt index 4915daf..bed1538 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_variables-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_examples_variables-0.can parse.verified.txt @@ -8,18 +8,18 @@ let state = { Todo = () } // line 10 @"variables-0.visp" let value = 1 // line 11 @"variables-0.visp" -printfn ("value is %i") (value) +printfn "value is %i" value // line 14 @"variables-0.visp" let mutable valuemut = 1 // line 15 @"variables-0.visp" -printfn ("valuemut is %i") (valuemut) +printfn "valuemut is %i" valuemut // line 19 @"variables-0.visp" -valuemut <- (valuemut) + -(1) +valuemut <- valuemut + +1 // line 21 @"variables-0.visp" let visp_result_todo = // line 21 @"variables-0.visp" - printfn ("valuemut is %i") (valuemut) + printfn "valuemut is %i" valuemut // line 21 @"variables-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-0.can parse.verified.txt index aa5a715..88706f6 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-0.can parse.verified.txt @@ -8,9 +8,9 @@ let state = { Todo = () } // line 8 @"for-in-0.visp" let visp_result_todo = // line 8 @"for-in-0.visp" - for var in (0) .. (1) .. (10) do + for var in 0 .. 1 .. 10 do // line 9 @"for-in-0.visp" - printfn ("var is: %O") (var) + printfn "var is: %O" var // line 8 @"for-in-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-1.can parse.verified.txt index 5cbf246..be31fd1 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-1.can parse.verified.txt @@ -10,7 +10,7 @@ let visp_result_todo = // line 8 @"for-in-1.visp" for var in [1;2;3;4;5;6] do // line 9 @"for-in-1.visp" - printfn ("var is: %O") (var) + printfn "var is: %O" var // line 8 @"for-in-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-2.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-2.can parse.verified.txt index c02b338..e4a4059 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-2.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-2.can parse.verified.txt @@ -10,7 +10,7 @@ let visp_result_todo = // line 8 @"for-in-2.visp" for var in [|1;2;3;4;5;6|] do // line 9 @"for-in-2.visp" - printfn ("var is: %O") (var) + printfn "var is: %O" var // line 8 @"for-in-2.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-3.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-3.can parse.verified.txt index 7bc9f3f..dad871f 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-3.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-3.can parse.verified.txt @@ -10,7 +10,7 @@ let visp_result_todo = // line 9 @"for-in-3.visp" for var in [1;2;3;4;5;6] |> Set.ofList do // line 10 @"for-in-3.visp" - printfn ("var is: %O") (var) + printfn "var is: %O" var // line 9 @"for-in-3.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-4.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-4.can parse.verified.txt index a21a643..f86b640 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-4.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-in_for-in-4.can parse.verified.txt @@ -10,7 +10,7 @@ let visp_result_todo = // line 9 @"for-in-4.visp" for var in [(1, 2);(3, 4);(5, 6)] |> Map.ofList do // line 10 @"for-in-4.visp" - printfn ("var is: %O") (var) + printfn "var is: %O" var // line 9 @"for-in-4.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-to_for-to-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-to_for-to-0.can parse.verified.txt index 91fbd12..2732afc 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_for-to_for-to-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_for-to_for-to-0.can parse.verified.txt @@ -10,18 +10,18 @@ let func1 () = // line 9 @"for-to-0.visp" for var = 1 to 10 do // line 10 @"for-to-0.visp" - printf ("%d ") (var) + printf "%d " var // line 11 @"for-to-0.visp" - printfn ("") + printfn "" // line 13 @"for-to-0.visp" let func2 () = // line 14 @"for-to-0.visp" for var = 10 downto 1 do // line 15 @"for-to-0.visp" - printf ("%d ") (var) + printf "%d " var // line 16 @"for-to-0.visp" - printfn ("") + printfn "" // line 18 @"for-to-0.visp" func1 () @@ -35,22 +35,22 @@ let start x y = // line 22 @"for-to-0.visp" let _end x y = // line 22 @"for-to-0.visp" - (x) + + x + (2 * y) // line 24 @"for-to-0.visp" let func3 x y = // line 25 @"for-to-0.visp" - for var = start (x) (y) to _end (x) (y) do + for var = start x y to _end x y do // line 26 @"for-to-0.visp" - printf ("%d ") (var) + printf "%d " var // line 27 @"for-to-0.visp" - printfn ("") + printfn "" // line 30 @"for-to-0.visp" let visp_result_todo = // line 30 @"for-to-0.visp" - func3 (10) (4) + func3 10 4 // line 30 @"for-to-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_functions_apply-method-args-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_functions_apply-method-args-0.can parse.verified.txt index 20d577d..a4d3b6e 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_functions_apply-method-args-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_functions_apply-method-args-0.can parse.verified.txt @@ -21,7 +21,7 @@ type Pos (x: int32, y: int32) = // line 11 @"apply-method-args-0.visp" override _.ToString () = // line 11 @"apply-method-args-0.visp" - sprintf ("(y: %A, x: %A)") (y) (x) + sprintf "(y: %A, x: %A)" y x // line 11 @"apply-method-args-0.visp" let mkPos x y = @@ -40,18 +40,18 @@ type TileMap (grid: Grid, rocks: array) = // line 24 @"apply-method-args-0.visp" let height = // line 24 @"apply-method-args-0.visp" - Array2D.length1 (grid) + Array2D.length1 grid // line 25 @"apply-method-args-0.visp" let width = // line 25 @"apply-method-args-0.visp" - Array2D.length2 (grid) + Array2D.length2 grid // line 27 @"apply-method-args-0.visp" member _.Rocks = rocks // line 29 @"apply-method-args-0.visp" override _.ToString () = // line 30 @"apply-method-args-0.visp" - sprintf ("TileMap\n%A") (grid) + sprintf "TileMap\n%A" grid // line 32 @"apply-method-args-0.visp" member t.MoveRock (from: Pos) (_to: Pos) = @@ -121,7 +121,7 @@ type TileMap (grid: Grid, rocks: array) = None else // line 51 @"apply-method-args-0.visp" - failwith ("unreachable") + failwith "unreachable" // line 58 @"apply-method-args-0.visp" and set ((pos: Pos)) ch = // line 59 @"apply-method-args-0.visp" @@ -170,7 +170,7 @@ type TileMap (grid: Grid, rocks: array) = () else // line 61 @"apply-method-args-0.visp" - failwith ("unreachable") + failwith "unreachable" // line 72 @"apply-method-args-0.visp" let TiltNorth (tm: TileMap) = // line 73 @"apply-method-args-0.visp" @@ -187,21 +187,21 @@ let TiltNorth (tm: TileMap) = // line 77 @"apply-method-args-0.visp" for rock in rocksToMove do // line 78 @"apply-method-args-0.visp" - printfn ("%A") (rock) + printfn "%A" rock // line 79 @"apply-method-args-0.visp" let mutable pos = rock // line 80 @"apply-method-args-0.visp" - while CoreMethods.isTruthy((tm.MoveRock (pos) (NorthOf (pos)))) do + while CoreMethods.isTruthy((tm.MoveRock pos (NorthOf pos))) do // line 81 @"apply-method-args-0.visp" - pos <- NorthOf (pos) + pos <- NorthOf pos // line 84 @"apply-method-args-0.visp" - printfn ("%A") (tm) + printfn "%A" tm () // line 88 @"apply-method-args-0.visp" let visp_result_todo = // line 88 @"apply-method-args-0.visp" - printfn ("OK") + printfn "OK" // line 88 @"apply-method-args-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_hashmap_hashmap-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_hashmap_hashmap-0.can parse.verified.txt index fa1762b..56e078e 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_hashmap_hashmap-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_hashmap_hashmap-0.can parse.verified.txt @@ -10,13 +10,13 @@ let map = // line 8 @"hashmap-0.visp" [(Value.keyword(":this-is-a-key"), Value.string("value"));(Value.string("string as key"), Value.string("string value"));(Value.from(0), Value.string("int as key"))] |> HashMap.ofList // line 12 @"hashmap-0.visp" -printfn ("%O") (map) +printfn "%O" map // line 14 @"hashmap-0.visp" -printfn ("%O") (HashMap.find (Value.string ("string as key")) (map)) +printfn "%O" (HashMap.find (Value.string "string as key") map) // line 16 @"hashmap-0.visp" let visp_result_todo = // line 16 @"hashmap-0.visp" - printfn ("%O") (HashMap.find (Value.keyword(":this-is-a-key")) (map)) + printfn "%O" (HashMap.find (Value.keyword(":this-is-a-key")) map) // line 16 @"hashmap-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_hashset_hashset-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_hashset_hashset-0.can parse.verified.txt index 878013d..0952f1c 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_hashset_hashset-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_hashset_hashset-0.can parse.verified.txt @@ -12,7 +12,7 @@ let set = // line 13 @"hashset-0.visp" let visp_result_todo = // line 13 @"hashset-0.visp" - printfn ("%O") (set) + printfn "%O" set // line 13 @"hashset-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_if_if-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_if_if-0.can parse.verified.txt index 3e2ea03..b50acc9 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_if_if-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_if_if-0.can parse.verified.txt @@ -29,5 +29,5 @@ let visp_result_todo = // line 14 @"if-0.visp" alt () // line 12 @"if-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_and-example-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_and-example-0.can parse.verified.txt index 57715ce..b773bd8 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_and-example-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_and-example-0.can parse.verified.txt @@ -8,13 +8,13 @@ let state = { Todo = () } // line 8 @"and-example-0.visp" let ``macro_my-and`` = "__MACRO_INIT__" // line 17 @"and-example-0.visp" -printfn ("my-and %A") (true) +printfn "my-and %A" true // line 18 @"and-example-0.visp" -printfn ("my-and %A") (false) +printfn "my-and %A" false // line 19 @"and-example-0.visp" -printfn ("my-and %A") (true) +printfn "my-and %A" true // line 20 @"and-example-0.visp" -printfn ("my-and %A") ( +printfn "my-and %A" ( if CoreMethods.isTruthy( true) then @@ -22,7 +22,7 @@ printfn ("my-and %A") ( else false) // line 21 @"and-example-0.visp" -printfn ("my-and %A") ( +printfn "my-and %A" ( if CoreMethods.isTruthy( true) then @@ -30,7 +30,7 @@ printfn ("my-and %A") ( else false) // line 22 @"and-example-0.visp" -printfn ("my-and %A") ( +printfn "my-and %A" ( if CoreMethods.isTruthy( true) then @@ -46,7 +46,7 @@ printfn ("my-and %A") ( // line 23 @"and-example-0.visp" let visp_result_todo = // line 23 @"and-example-0.visp" - printfn ("my-and %A") ( + printfn "my-and %A" ( if CoreMethods.isTruthy( true) then @@ -60,5 +60,5 @@ let visp_result_todo = else false) // line 23 @"and-example-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_chars-in-macros-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_chars-in-macros-0.can parse.verified.txt index e57a861..96c0a75 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_chars-in-macros-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_chars-in-macros-0.can parse.verified.txt @@ -8,17 +8,17 @@ let state = { Todo = () } // line 8 @"chars-in-macros-0.visp" let macro_PrintChars = "__MACRO_INIT__" // line 13 @"chars-in-macros-0.visp" -printfn ("Values: %A") ([('a', '=', 'B', '\n', ' ', '\t')]) +printfn "Values: %A" ([('a', '=', 'B', '\n', ' ', '\t')]) // line 15 @"chars-in-macros-0.visp" -printfn ("%A") ('a') +printfn "%A" 'a' // line 16 @"chars-in-macros-0.visp" -printfn ("%A") ('\n') +printfn "%A" '\n' // line 17 @"chars-in-macros-0.visp" -printfn ("%A") (' ') +printfn "%A" ' ' // line 18 @"chars-in-macros-0.visp" let visp_result_todo = // line 18 @"chars-in-macros-0.visp" - printfn ("%A") ('\t') + printfn "%A" '\t' // line 18 @"chars-in-macros-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-0.can parse.verified.txt index 8a59e33..2d7c163 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-0.can parse.verified.txt @@ -28,7 +28,7 @@ let visp_result_todo = 3 else // line 17 @"cond-macro-0.visp" - failwith ("unreachable cond") + failwith "unreachable cond" // line 17 @"cond-macro-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-1.can parse.verified.txt index 59a8c59..41a80ca 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_cond-macro-1.can parse.verified.txt @@ -16,9 +16,9 @@ let visp_result_todo = // line 22 @"cond-macro-1.visp" // line 22 @"cond-macro-1.visp" - printfn ("body here1") + printfn "body here1" // line 22 @"cond-macro-1.visp" - printfn ("body here2") + printfn "body here2" () else // line 22 @"cond-macro-1.visp" @@ -28,9 +28,9 @@ let visp_result_todo = // line 22 @"cond-macro-1.visp" // line 22 @"cond-macro-1.visp" - printfn ("here1") + printfn "here1" // line 22 @"cond-macro-1.visp" - printfn ("here2") + printfn "here2" else // line 22 @"cond-macro-1.visp" if CoreMethods.isTruthy( @@ -39,12 +39,12 @@ let visp_result_todo = // line 22 @"cond-macro-1.visp" // line 22 @"cond-macro-1.visp" - printfn ("default1") + printfn "default1" // line 22 @"cond-macro-1.visp" - printfn ("default2") + printfn "default2" else // line 22 @"cond-macro-1.visp" - failwith ("unreachable") + failwith "unreachable" // line 22 @"cond-macro-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_count-exprs-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_count-exprs-0.can parse.verified.txt index 79673d7..de63fb2 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_count-exprs-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_count-exprs-0.can parse.verified.txt @@ -10,17 +10,17 @@ let macro_CountExprsExampleTest1 = "__MACRO_INIT__" // line 15 @"count-exprs-0.visp" let exprCount = // line 15 @"count-exprs-0.visp" - (1) + - ((1) + - ((1) + - ((1) + - ((1) + - ((1) + - (1)))))) + 1 + + (1 + + (1 + + (1 + + (1 + + (1 + + 1))))) // line 17 @"count-exprs-0.visp" let visp_result_todo = // line 17 @"count-exprs-0.visp" - printfn ("exprs: %A") (exprCount) + printfn "exprs: %A" exprCount // line 17 @"count-exprs-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_my-rinit-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_my-rinit-0.can parse.verified.txt index 80bd9e5..3d57f42 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_my-rinit-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_my-rinit-0.can parse.verified.txt @@ -11,7 +11,7 @@ type Mapping = // line 13 @"my-rinit-0.visp" member this.Stuff () = // line 14 @"my-rinit-0.visp" - printfn ("doing stuff %A") ((this.src)) + printfn "doing stuff %A" ((this.src)) // line 17 @"my-rinit-0.visp" let macro_MyRinit = "__MACRO_INIT__" @@ -20,11 +20,11 @@ let temp = // line 22 @"my-rinit-0.visp" { src = 1; Mapping.dest = 2; range = 3 } // line 23 @"my-rinit-0.visp" -printfn ("Record is %A") (temp) +printfn "Record is %A" temp // line 24 @"my-rinit-0.visp" temp.Stuff() // line 26 @"my-rinit-0.visp" let visp_result_todo = () // line 26 @"my-rinit-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-0.can parse.verified.txt index 9b87175..9ba00c4 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-0.can parse.verified.txt @@ -21,7 +21,7 @@ type Pos (x: int32, y: int32) = // line 10 @"nested-macro-expansion-0.visp" override _.ToString () = // line 10 @"nested-macro-expansion-0.visp" - sprintf ("Pos(x: %A, y: %A)") (x) (y) + sprintf "Pos(x: %A, y: %A)" x y // line 10 @"nested-macro-expansion-0.visp" let mkPos x y = @@ -37,7 +37,7 @@ type TileMap (grid: Grid, start: Pos) = // line 22 @"nested-macro-expansion-0.visp" override _.ToString () = // line 23 @"nested-macro-expansion-0.visp" - sprintf ("TileMap(%A)\n%A") (start) (grid) + sprintf "TileMap(%A)\n%A" start grid // line 26 @"nested-macro-expansion-0.visp" member _.Start = @@ -96,11 +96,11 @@ type TileMap (grid: Grid, start: Pos) = None else // line 33 @"nested-macro-expansion-0.visp" - failwith ("unreachable") + failwith "unreachable" // line 43 @"nested-macro-expansion-0.visp" let visp_result_todo = // line 43 @"nested-macro-expansion-0.visp" - printfn ("OK") + printfn "OK" // line 43 @"nested-macro-expansion-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-1.can parse.verified.txt index cac57c1..1fcad37 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_nested-macro-expansion-1.can parse.verified.txt @@ -48,7 +48,7 @@ let Something () = match PopWork () with | (bi , off , count) -> // line 29 @"nested-macro-expansion-1.visp" - printfn ("(%A,%A,%A)") (bi) (off) (count) + printfn "(%A,%A,%A)" bi off count // line 30 @"nested-macro-expansion-1.visp" let brokenLength = // line 30 @"nested-macro-expansion-1.visp" @@ -56,8 +56,8 @@ let Something () = // line 31 @"nested-macro-expansion-1.visp" let offsetEnd = // line 31 @"nested-macro-expansion-1.visp" - (off) + - (brokenLength) + off + + brokenLength // line 38 @"nested-macro-expansion-1.visp" if CoreMethods.isTruthy( CoreMethods.``not``( @@ -74,7 +74,7 @@ let Something () = orTemp else // line 38 @"nested-macro-expansion-1.visp" - CoreMethods.``neq?``((conditions.[dec (off)]), '#'))) + CoreMethods.``neq?``((conditions.[dec off]), '#'))) then // line 38 @"nested-macro-expansion-1.visp" if CoreMethods.isTruthy( @@ -111,7 +111,7 @@ let Something () = else // line 38 @"nested-macro-expansion-1.visp" if CoreMethods.isTruthy( - CoreMethods.``eq?``(bi, dec (brokenLength))) + CoreMethods.``eq?``(bi, dec brokenLength)) then // line 38 @"nested-macro-expansion-1.visp" @@ -122,8 +122,8 @@ let Something () = // line 38 @"nested-macro-expansion-1.visp" // line 38 @"nested-macro-expansion-1.visp" - result <- (result) + - (count) + result <- result + + count else // line 38 @"nested-macro-expansion-1.visp" if CoreMethods.isTruthy( @@ -134,7 +134,7 @@ let Something () = // line 38 @"nested-macro-expansion-1.visp" let mutable nextPossibleIndex = // line 38 @"nested-macro-expansion-1.visp" - System.Array.BinarySearch (possibleOffsets, inc (offsetEnd)) + System.Array.BinarySearch (possibleOffsets, inc offsetEnd) // line 38 @"nested-macro-expansion-1.visp" if CoreMethods.isTruthy( CoreMethods.``lt``(nextPossibleIndex, 0)) @@ -142,18 +142,18 @@ let Something () = // line 38 @"nested-macro-expansion-1.visp" // line 38 @"nested-macro-expansion-1.visp" - nextPossibleIndex <- bcompl (nextPossibleIndex) + nextPossibleIndex <- bcompl nextPossibleIndex // line 38 @"nested-macro-expansion-1.visp" - EnqueueWork (inc (bi)) (offsetEnd) (nextPossibleIndex) (count) + EnqueueWork (inc bi) offsetEnd nextPossibleIndex count else // line 38 @"nested-macro-expansion-1.visp" - failwith ("unbalanced cond") + failwith "unbalanced cond" () // line 67 @"nested-macro-expansion-1.visp" let visp_result_todo = // line 67 @"nested-macro-expansion-1.visp" - printfn ("OK") + printfn "OK" // line 67 @"nested-macro-expansion-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_or-example-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_or-example-0.can parse.verified.txt index d14816c..f6642b0 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_or-example-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_or-example-0.can parse.verified.txt @@ -8,13 +8,13 @@ let state = { Todo = () } // line 8 @"or-example-0.visp" let ``macro_my-or`` = "__MACRO_INIT__" // line 20 @"or-example-0.visp" -printfn ("my-or %A") (false) +printfn "my-or %A" false // line 21 @"or-example-0.visp" -printfn ("my-or %A") (false) +printfn "my-or %A" false // line 22 @"or-example-0.visp" -printfn ("my-or %A") (true) +printfn "my-or %A" true // line 23 @"or-example-0.visp" -printfn ("my-or %A") (( +printfn "my-or %A" (( // line 23 @"or-example-0.visp" let orTemp = true // line 23 @"or-example-0.visp" @@ -25,7 +25,7 @@ printfn ("my-or %A") (( else false)) // line 24 @"or-example-0.visp" -printfn ("my-or %A") (( +printfn "my-or %A" (( // line 24 @"or-example-0.visp" let orTemp = true // line 24 @"or-example-0.visp" @@ -36,7 +36,7 @@ printfn ("my-or %A") (( else true)) // line 25 @"or-example-0.visp" -printfn ("my-or %A") (( +printfn "my-or %A" (( // line 25 @"or-example-0.visp" let orTemp = true // line 25 @"or-example-0.visp" @@ -57,7 +57,7 @@ printfn ("my-or %A") (( else false))) // line 26 @"or-example-0.visp" -printfn ("my-or %A") (( +printfn "my-or %A" (( // line 26 @"or-example-0.visp" let orTemp = true // line 26 @"or-example-0.visp" @@ -78,13 +78,13 @@ printfn ("my-or %A") (( else true))) // line 28 @"or-example-0.visp" -printfn ("my-or %A") (Value.bool (false)) +printfn "my-or %A" (Value.bool false) // line 29 @"or-example-0.visp" -printfn ("my-or %A") (( +printfn "my-or %A" (( // line 29 @"or-example-0.visp" let orTemp = // line 29 @"or-example-0.visp" - Value.bool (false) + Value.bool false // line 29 @"or-example-0.visp" if CoreMethods.isTruthy( orTemp) @@ -92,15 +92,15 @@ printfn ("my-or %A") (( orTemp else // line 29 @"or-example-0.visp" - Value.string ("this works, yay"))) + Value.string "this works, yay")) // line 30 @"or-example-0.visp" let visp_result_todo = // line 30 @"or-example-0.visp" - printfn ("my-or %A") (( + printfn "my-or %A" (( // line 30 @"or-example-0.visp" let orTemp = // line 30 @"or-example-0.visp" - Value.bool (false) + Value.bool false // line 30 @"or-example-0.visp" if CoreMethods.isTruthy( orTemp) @@ -112,7 +112,7 @@ let visp_result_todo = // line 30 @"or-example-0.visp" let orTemp = // line 30 @"or-example-0.visp" - Value.bool (false) + Value.bool false // line 30 @"or-example-0.visp" if CoreMethods.isTruthy( orTemp) @@ -120,7 +120,7 @@ let visp_result_todo = orTemp else // line 30 @"or-example-0.visp" - Value.string ("this works, yay")))) + Value.string "this works, yay"))) // line 30 @"or-example-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-example-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-example-1.can parse.verified.txt index cd09de2..f7b7ee4 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-example-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-example-1.can parse.verified.txt @@ -19,8 +19,8 @@ type Range (start: int64, len: int64) = // line 8 @"struct-example-1.visp" member _.End = // line 8 @"struct-example-1.visp" - (start) + - (len) + start + + len // line 8 @"struct-example-1.visp" member d.Offset v = // line 8 @"struct-example-1.visp" @@ -40,7 +40,7 @@ type Range (start: int64, len: int64) = // line 8 @"struct-example-1.visp" override t.ToString () = // line 8 @"struct-example-1.visp" - sprintf ("Range(%i, %i)") ((t.Start)) ((t.Len)) + sprintf "Range(%i, %i)" ((t.Start)) ((t.Len)) // line 8 @"struct-example-1.visp" let mkRange start len = @@ -48,9 +48,9 @@ let mkRange start len = (new Range(start, len)) // line 26 @"struct-example-1.visp" -printfn ("Range is: %A") ((new Range(0, 5))) +printfn "Range is: %A" ((new Range(0, 5))) // line 27 @"struct-example-1.visp" -printfn ("Range end is: %A") ((new Range(0, 5)) +printfn "Range end is: %A" ((new Range(0, 5)) |> (fun a1 -> // line 27 @"struct-example-1.visp" (a1.End))) @@ -104,12 +104,12 @@ type SourceDestMap (dest: int64, src: int64, len: int64) = src else // line 29 @"struct-example-1.visp" - failwith ("unreachable cond") + failwith "unreachable cond" // line 29 @"struct-example-1.visp" override t.ToString () = // line 29 @"struct-example-1.visp" - sprintf ("(%A, %A, %i)") ((t.Dest)) ((t.Src)) ((t.Len)) + sprintf "(%A, %A, %i)" ((t.Dest)) ((t.Src)) ((t.Len)) // line 29 @"struct-example-1.visp" let mkSourceDestMap dest src len = @@ -119,5 +119,5 @@ let mkSourceDestMap dest src len = // line 51 @"struct-example-1.visp" let visp_result_todo = () // line 51 @"struct-example-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-0.can parse.verified.txt index 3c3155c..ac3a812 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-0.can parse.verified.txt @@ -27,9 +27,9 @@ let instance = // line 22 @"struct-macro-0.visp" (new Example(1, 2)) // line 24 @"struct-macro-0.visp" -printfn ("Example Struct is %A") (instance) +printfn "Example Struct is %A" instance // line 25 @"struct-macro-0.visp" -printfn ("Example IsValueType %A") (instance +printfn "Example IsValueType %A" (instance |> (fun a1 -> // line 25 @"struct-macro-0.visp" a1.GetType()) @@ -39,7 +39,7 @@ printfn ("Example IsValueType %A") (instance // line 26 @"struct-macro-0.visp" let visp_result_todo = // line 26 @"struct-macro-0.visp" - printfn ("Example Result is %i") ((instance.Sum())) + printfn "Example Result is %i" ((instance.Sum())) // line 26 @"struct-macro-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-2.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-2.can parse.verified.txt index 746adba..f4eac0f 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-2.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-2.can parse.verified.txt @@ -40,11 +40,11 @@ let mkExample x y z w = // line 31 @"struct-macro-2.visp" let instance = // line 31 @"struct-macro-2.visp" - mkExample (1) (2) (3) (4) + mkExample 1 2 3 4 // line 33 @"struct-macro-2.visp" -printfn ("Example Struct is %A") (instance) +printfn "Example Struct is %A" instance // line 34 @"struct-macro-2.visp" -printfn ("Example IsValueType %A") (instance +printfn "Example IsValueType %A" (instance |> (fun a1 -> // line 34 @"struct-macro-2.visp" a1.GetType()) @@ -54,7 +54,7 @@ printfn ("Example IsValueType %A") (instance // line 35 @"struct-macro-2.visp" let visp_result_todo = // line 35 @"struct-macro-2.visp" - printfn ("Example Result is %i") ((instance.Sum())) + printfn "Example Result is %i" ((instance.Sum())) // line 35 @"struct-macro-2.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-3.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-3.can parse.verified.txt index fa53ef9..8efce1d 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-3.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_struct-macro-3.can parse.verified.txt @@ -21,8 +21,8 @@ type Range (start: int64, len: int64) = // line 25 @"struct-macro-3.visp" member _.End = // line 25 @"struct-macro-3.visp" - (start) + - (len) + start + + len // line 25 @"struct-macro-3.visp" member d.Offset v = // line 25 @"struct-macro-3.visp" @@ -42,16 +42,16 @@ type Range (start: int64, len: int64) = // line 25 @"struct-macro-3.visp" override t.ToString () = // line 25 @"struct-macro-3.visp" - sprintf ("Range(%i, %i)") ((t.Start)) ((t.Len)) + sprintf "Range(%i, %i)" ((t.Start)) ((t.Len)) // line 43 @"struct-macro-3.visp" let instance = // line 43 @"struct-macro-3.visp" (new Range(1, 2)) // line 45 @"struct-macro-3.visp" -printfn ("Example Struct is %A") (instance) +printfn "Example Struct is %A" instance // line 46 @"struct-macro-3.visp" -printfn ("Example IsValueType %A") (instance +printfn "Example IsValueType %A" (instance |> (fun a1 -> // line 46 @"struct-macro-3.visp" a1.GetType()) @@ -61,7 +61,7 @@ printfn ("Example IsValueType %A") (instance // line 47 @"struct-macro-3.visp" let visp_result_todo = // line 47 @"struct-macro-3.visp" - printfn ("Example Result is %A") ((instance.ToString())) + printfn "Example Result is %A" ((instance.ToString())) // line 47 @"struct-macro-3.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-0.can parse.verified.txt index 0e9a137..964f3a0 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-0.can parse.verified.txt @@ -15,8 +15,8 @@ let name arg = match arg with | (a, b) -> // line 21 @"syntax-macro-0.visp" - (a) + - (b) + a + + b | _ -> 0 @@ -26,15 +26,15 @@ let name2 tup = match tup with | (a, b) -> // line 28 @"syntax-macro-0.visp" - (a) + - (b) + a + + b | _ -> 0 // line 31 @"syntax-macro-0.visp" let visp_result_todo = // line 31 @"syntax-macro-0.visp" - printfn ("%A & %A") (name (1, 2)) (name2 (1, 2)) + printfn "%A & %A" (name (1, 2)) (name2 (1, 2)) // line 31 @"syntax-macro-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-2.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-2.can parse.verified.txt index 6c2cd9a..6d57917 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-2.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_syntax-macro-2.can parse.verified.txt @@ -17,23 +17,23 @@ let lambda = match arg with | (a , b) -> // line 28 @"syntax-macro-2.visp" - (a) + - (b)) + a + + b) // line 29 @"syntax-macro-2.visp" let named arg = // line 29 @"syntax-macro-2.visp" match arg with | (a , b) -> // line 29 @"syntax-macro-2.visp" - (a) + - (b) + a + + b // line 32 @"syntax-macro-2.visp" -printfn ("lambda: %i") (lambda (1, 2)) +printfn "lambda: %i" (lambda (1, 2)) // line 33 @"syntax-macro-2.visp" let visp_result_todo = // line 33 @"syntax-macro-2.visp" - printfn ("named: %i") (named (1, 2)) + printfn "named: %i" (named (1, 2)) // line 33 @"syntax-macro-2.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_when-unless-example-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_when-unless-example-0.can parse.verified.txt index 299564f..7ba2ad3 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_when-unless-example-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_when-unless-example-0.can parse.verified.txt @@ -16,9 +16,9 @@ if CoreMethods.isTruthy( // line 20 @"when-unless-example-0.visp" // line 20 @"when-unless-example-0.visp" - printfn ("inside when 1") + printfn "inside when 1" // line 20 @"when-unless-example-0.visp" - printfn ("inside when 2") + printfn "inside when 2" // line 25 @"when-unless-example-0.visp" let visp_result_todo = // line 25 @"when-unless-example-0.visp" @@ -28,9 +28,9 @@ let visp_result_todo = // line 25 @"when-unless-example-0.visp" // line 25 @"when-unless-example-0.visp" - printfn ("inside unless 3") + printfn "inside unless 3" // line 25 @"when-unless-example-0.visp" - printfn ("inside unless 4") + printfn "inside unless 4" // line 25 @"when-unless-example-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_while-match-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_while-match-0.can parse.verified.txt index d1e457d..c2f1866 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_while-match-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_macros_while-match-0.can parse.verified.txt @@ -21,9 +21,9 @@ type Counter () = // line 13 @"while-match-0.visp" ( // line 14 @"while-match-0.visp" - count <- inc (count) + count <- inc count // line 15 @"while-match-0.visp" - Some (count)) + Some count) // line 19 @"while-match-0.visp" let counter = @@ -44,7 +44,7 @@ let visp_result_todo = false | (Some c) -> // line 21 @"while-match-0.visp" - printfn ("Count is: %i") (c) + printfn "Count is: %i" c // line 21 @"while-match-0.visp" let _ = // line 21 @"while-match-0.visp" @@ -52,5 +52,5 @@ let visp_result_todo = true ()) // line 21 @"while-match-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_numbers_int-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_numbers_int-0.can parse.verified.txt index 1dbc30a..2405d13 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_numbers_int-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_numbers_int-0.can parse.verified.txt @@ -6,13 +6,13 @@ open Visp.Runtime.Library let state = { Todo = () } // line 9 @"int-0.visp" -printfn ("int32 is %A") (99) +printfn "int32 is %A" 99 // line 10 @"int-0.visp" -printfn ("int32 is %A") (99) +printfn "int32 is %A" 99 // line 11 @"int-0.visp" let visp_result_todo = // line 11 @"int-0.visp" - printfn ("int64 is %A") (99L) + printfn "int64 is %A" 99L // line 11 @"int-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_call-tuple-args-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_call-tuple-args-0.can parse.verified.txt index fa08480..cad7f58 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_call-tuple-args-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_call-tuple-args-0.can parse.verified.txt @@ -6,11 +6,11 @@ open Visp.Runtime.Library let state = { Todo = () } // line 8 @"call-tuple-args-0.visp" -printfn ("result is is %A") ((System.String.Concat ("first", "second", "third"))) +printfn "result is is %A" ((System.String.Concat ("first", "second", "third"))) // line 9 @"call-tuple-args-0.visp" let visp_result_todo = // line 9 @"call-tuple-args-0.visp" - printfn ("result is is %A") (System.String.Concat ("first", "second", "third")) + printfn "result is is %A" (System.String.Concat ("first", "second", "third")) // line 9 @"call-tuple-args-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_lambda-shorthand-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_lambda-shorthand-0.can parse.verified.txt index bf3fe49..4b0f211 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_lambda-shorthand-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_lambda-shorthand-0.can parse.verified.txt @@ -10,12 +10,12 @@ let temp = // line 8 @"lambda-shorthand-0.visp" (fun arg1 arg2 -> // line 8 @"lambda-shorthand-0.visp" - (arg1) + - (arg2)) + arg1 + + arg2) // line 9 @"lambda-shorthand-0.visp" let visp_result_todo = // line 9 @"lambda-shorthand-0.visp" - temp (1) (2) + temp 1 2 // line 9 @"lambda-shorthand-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_let-values.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_let-values.can parse.verified.txt index e8baa6d..0c3f9d7 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_let-values.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_let-values.can parse.verified.txt @@ -6,11 +6,11 @@ open Visp.Runtime.Library let state = { Todo = () } // line 13 @"let-values.visp" -printfn ("%i") (CoreMethods.``add``(1, 2)) +printfn "%i" (CoreMethods.``add``(1, 2)) // line 14 @"let-values.visp" -printfn ("%i") (List.reduce (add) ([1;2;3;4;5])) +printfn "%i" (List.reduce add ([1;2;3;4;5])) // line 16 @"let-values.visp" let visp_result_todo = "let-value support?" // line 16 @"let-values.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_match-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_match-0.can parse.verified.txt index c7d6c1d..62dd24a 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_match-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_match-0.can parse.verified.txt @@ -11,56 +11,56 @@ let state = { Todo = () } match "hello" with | "hello" -> // line 13 @"match-0.visp" - printfn ("was hello") + printfn "was hello" | _ -> // line 16 @"match-0.visp" - printfn ("default") + printfn "default" // line 19 @"match-0.visp" match (1, 2) with | (a, 2) when CoreMethods.isTruthy(CoreMethods.``gte``(a, 0)) -> // line 22 @"match-0.visp" - printfn ("a is %A") (a) + printfn "a is %A" a | _ -> // line 25 @"match-0.visp" - printfn ("default") + printfn "default" // line 28 @"match-0.visp" match (1, 2) with | (a , 2) when CoreMethods.isTruthy(CoreMethods.``gte``(a, 0)) -> // line 31 @"match-0.visp" - printfn ("a is %A") (a) + printfn "a is %A" a | _ -> // line 34 @"match-0.visp" - printfn ("default") + printfn "default" // line 37 @"match-0.visp" -match Some (1) with +match Some 1 with | (Some a) when CoreMethods.isTruthy(CoreMethods.``gte``(a, 0)) -> // line 40 @"match-0.visp" - printfn ("a is %A") (a) + printfn "a is %A" a | (Some _) -> // line 43 @"match-0.visp" - printfn ("some other") + printfn "some other" | _ -> // line 46 @"match-0.visp" - printfn ("default") + printfn "default" // line 50 @"match-0.visp" match [1;2;3;4] with | (x :: y :: rest) -> // line 52 @"match-0.visp" - printfn ("x is %A y is %A rest is %A") (x) (y) (rest) + printfn "x is %A y is %A rest is %A" x y rest | (x :: rest) -> // line 55 @"match-0.visp" - printfn ("x is %A rest is %A") (x) (rest) + printfn "x is %A rest is %A" x rest | (x :: []) -> // line 58 @"match-0.visp" - printfn ("x is %A rest is empty") (x) + printfn "x is %A rest is empty" x | ([]) -> // line 60 @"match-0.visp" - printfn ("empty") + printfn "empty" | [] -> // line 61 @"match-0.visp" - printfn ("empty") + printfn "empty" // line 64 @"match-0.visp" let visp_result_todo = () // line 64 @"match-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_props.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_props.can parse.verified.txt index 26d5a48..7605396 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_props.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_props.can parse.verified.txt @@ -12,5 +12,5 @@ let visp_result_todo = // line 9 @"props.visp" (hello.Length) // line 9 @"props.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-0.can parse.verified.txt index 3ef3742..9312597 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-0.can parse.verified.txt @@ -27,21 +27,21 @@ TestUtils.runTest %s |> Async.AwaitTask """ // line 9 @"strings-0.visp" -printfn ("string is: '%s'") (``LiftedString1_strings-0``) +printfn "string is: '%s'" ``LiftedString1_strings-0`` // line 15 @"strings-0.visp" -printfn ("string is: '%s'") (``LiftedString3_strings-0``) +printfn "string is: '%s'" ``LiftedString3_strings-0`` // line 21 @"strings-0.visp" let ``generate-test`` path = // line 22 @"strings-0.visp" let template = // line 22 @"strings-0.visp" - sprintf (``LiftedString4_strings-0``) (path) (path) + sprintf ``LiftedString4_strings-0`` path path template // line 30 @"strings-0.visp" let visp_result_todo = // line 30 @"strings-0.visp" - printfn ("test is: '%s'") (``generate-test`` ("hello")) + printfn "test is: '%s'" (``generate-test`` "hello") // line 30 @"strings-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-1.can parse.verified.txt index db16c56..1311f57 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-1.can parse.verified.txt @@ -57,13 +57,13 @@ let inline ``LiftedString18_strings-1`` prefix testname exprArg0 exprArg1 = // line 8 @"strings-1.visp" let value = "r:\rt:\tn:\na:\a\"" // line 10 @"strings-1.visp" -printfn ("string is '%s'") (value) +printfn "string is '%s'" value // line 11 @"strings-1.visp" -printfn ("string is '%s'") ("""r:\rt:\tn:\na:\a""") +printfn "string is '%s'" """r:\rt:\tn:\na:\a""" // line 12 @"strings-1.visp" -printfn ("string is '%s'") ("""r:\rt:\tn:\na:\a""") +printfn "string is '%s'" """r:\rt:\tn:\na:\a""" // line 13 @"strings-1.visp" -printfn ("string is '%s'") (``LiftedString7_strings-1``) +printfn "string is '%s'" ``LiftedString7_strings-1`` // line 16 @"strings-1.visp" ( // line 17 @"strings-1.visp" @@ -71,11 +71,11 @@ printfn ("string is '%s'") (``LiftedString7_strings-1``) // line 18 @"strings-1.visp" ( // line 19 @"strings-1.visp" - printfn ("string is '%s'") (``LiftedString9_strings-1``)))) + printfn "string is '%s'" ``LiftedString9_strings-1``))) // line 24 @"strings-1.visp" let genTestHeader moduleName = // line 25 @"strings-1.visp" - sprintf (``LiftedString10_strings-1``) (moduleName) (moduleName) + sprintf ``LiftedString10_strings-1`` moduleName moduleName // line 37 @"strings-1.visp" let lf = System.Environment.NewLine @@ -99,39 +99,39 @@ let genTestTemplate (prefix: string) (path: string) = // line 45 @"strings-1.visp" let template = // line 45 @"strings-1.visp" - sprintf (``LiftedString15_strings-1``) (prefix) (testname) (path) + sprintf ``LiftedString15_strings-1`` prefix testname path // line 49 @"strings-1.visp" let template2 = // line 49 @"strings-1.visp" - ``LiftedString16_strings-1`` (prefix) (testname) (path) + ``LiftedString16_strings-1`` prefix testname path // line 53 @"strings-1.visp" let template3 = // line 53 @"strings-1.visp" - ``LiftedString17_strings-1`` (prefix) (testname) (path) + ``LiftedString17_strings-1`` prefix testname path // line 57 @"strings-1.visp" let template4 = // line 57 @"strings-1.visp" - ``LiftedString18_strings-1`` (prefix) (testname) ((1) + - (2) + - (3)) ((1) + - (2) + - (3)) + ``LiftedString18_strings-1`` prefix testname (1 + + 2 + + 3) (1 + + 2 + + 3) // line 61 @"strings-1.visp" - (template) + - (lf) + - (template2) + - (lf) + - (template3) + - (lf) + - (template4) + - (lf))) + template + + lf + + template2 + + lf + + template3 + + lf + + template4 + + lf)) // line 65 @"strings-1.visp" let visp_result_todo = // line 65 @"strings-1.visp" - (genTestHeader ("Temp")) + - (System.Environment.NewLine) + - (genTestTemplate ("example") ("example")) + (genTestHeader "Temp") + + System.Environment.NewLine + + (genTestTemplate "example" "example") // line 65 @"strings-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-0.can parse.verified.txt index 36fbdd4..22cab34 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-0.can parse.verified.txt @@ -24,15 +24,15 @@ let inline ``LiftedString8_strings-interpolation-0`` value exprArg0 = // line 8 @"strings-interpolation-0.visp" let value = "hello world" // line 10 @"strings-interpolation-0.visp" -printfn ("string is '%s'") (``LiftedString2_strings-interpolation-0`` (value) (value.Length)) +printfn "string is '%s'" (``LiftedString2_strings-interpolation-0`` value value.Length) // line 11 @"strings-interpolation-0.visp" -printfn ("string is '%s'") (``LiftedString4_strings-interpolation-0`` (value) (value.Length)) +printfn "string is '%s'" (``LiftedString4_strings-interpolation-0`` value value.Length) // line 12 @"strings-interpolation-0.visp" -printfn ("string is '%s'") (``LiftedString6_strings-interpolation-0`` (value) (value.Length)) +printfn "string is '%s'" (``LiftedString6_strings-interpolation-0`` value value.Length) // line 13 @"strings-interpolation-0.visp" let visp_result_todo = // line 13 @"strings-interpolation-0.visp" - printfn ("string is '%s'") (``LiftedString8_strings-interpolation-0`` (value) (value.Length)) + printfn "string is '%s'" (``LiftedString8_strings-interpolation-0`` value value.Length) // line 13 @"strings-interpolation-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-1.can parse.verified.txt index f423247..495ec26 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_strings-interpolation-1.can parse.verified.txt @@ -14,7 +14,7 @@ let value = "hello world" // line 10 @"strings-interpolation-1.visp" let visp_result_todo = // line 10 @"strings-interpolation-1.visp" - printfn ("string is '%s'") (``LiftedString2_strings-interpolation-1`` (value)) + printfn "string is '%s'" (``LiftedString2_strings-interpolation-1`` value) // line 10 @"strings-interpolation-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_tuple-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_tuple-0.can parse.verified.txt index 41e7748..3f37f6a 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_tuple-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_parsing_tuple-0.can parse.verified.txt @@ -6,13 +6,13 @@ open Visp.Runtime.Library let state = { Todo = () } // line 8 @"tuple-0.visp" -printfn ("%A") ((1, 2)) +printfn "%A" (1, 2) // line 9 @"tuple-0.visp" -printfn ("%A") ((1, 2, 3)) +printfn "%A" (1, 2, 3) // line 10 @"tuple-0.visp" let visp_result_todo = // line 10 @"tuple-0.visp" - printfn ("%A") ((1, 2, 3, 4)) + printfn "%A" (1, 2, 3, 4) // line 10 @"tuple-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_quotation_quote-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_quotation_quote-0.can parse.verified.txt index 777a845..c782461 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_quotation_quote-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_quotation_quote-0.can parse.verified.txt @@ -21,17 +21,17 @@ let something = temp.Add(Value.from(Value.symbol("a"))) Value.vector(temp));Value.from([Value.symbol("+");Value.symbol("a");Value.symbol("b");Value.from(1);Value.from([Value.symbol("call");Value.symbol("+");Value.from(1);Value.from(2)])])]) // line 13 @"quote-0.visp" -printfn ("items: %O") (items) +printfn "items: %O" items // line 14 @"quote-0.visp" -printfn ("sym: %O") (sym) +printfn "sym: %O" sym // line 15 @"quote-0.visp" -printfn ("something: %O") (something) +printfn "something: %O" something // line 16 @"quote-0.visp" -printfn ("nested: %O") (Value.from([Value.symbol("nested1");Value.from([Value.symbol("nested2");Value.from([Value.symbol("nested3");Value.from([Value.symbol("nested4");Value.symbol("and");Value.symbol("on");Value.symbol("and");Value.symbol("on");Value.keyword(":keyword")])])])])) +printfn "nested: %O" (Value.from([Value.symbol("nested1");Value.from([Value.symbol("nested2");Value.from([Value.symbol("nested3");Value.from([Value.symbol("nested4");Value.symbol("and");Value.symbol("on");Value.symbol("and");Value.symbol("on");Value.keyword(":keyword")])])])])) // line 17 @"quote-0.visp" let visp_result_todo = // line 17 @"quote-0.visp" - printfn ("nested vec: %O") ( + printfn "nested vec: %O" ( ( let temp = Vector(2) temp.Add(Value.from(Value.symbol("nested1"))) temp.Add(Value.from(Value.from([Value.symbol("nested2"); @@ -41,5 +41,5 @@ let visp_result_todo = Value.vector(temp))]))) Value.vector(temp))) // line 17 @"quote-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-fn-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-fn-0.can parse.verified.txt index ba131a6..bc49696 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-fn-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-fn-0.can parse.verified.txt @@ -17,10 +17,10 @@ type Mapping () = // line 13 @"member-fn-0.visp" member _.AddRange dest src len = // line 14 @"member-fn-0.visp" - for src_range in (src) .. ((src) + - (dec (len))) do + for src_range in src .. (src + + (dec len)) do // line 15 @"member-fn-0.visp" - printfn ("src %i") (src_range) + printfn "src %i" src_range () // line 20 @"member-fn-0.visp" @@ -28,9 +28,9 @@ let mapping = // line 20 @"member-fn-0.visp" (new Mapping()) // line 21 @"member-fn-0.visp" -mapping.AddRange (0) (1) (5) +mapping.AddRange 0 1 5 // line 23 @"member-fn-0.visp" let visp_result_todo = () // line 23 @"member-fn-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-get-set-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-get-set-0.can parse.verified.txt index a21ad36..67f73be 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-get-set-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_member-get-set-0.can parse.verified.txt @@ -56,19 +56,19 @@ let getAndSet = // line 33 @"member-get-set-0.visp" (new GetAndSet<_>(array)) // line 35 @"member-get-set-0.visp" -printfn ("%A") ((getOnly.[0])) +printfn "%A" ((getOnly.[0])) // line 37 @"member-get-set-0.visp" setOnly.[0] <- 99 // line 39 @"member-get-set-0.visp" -printfn ("%A") (array) +printfn "%A" array // line 41 @"member-get-set-0.visp" getAndSet.[1] <- 99 // line 43 @"member-get-set-0.visp" -printfn ("%A") ((getAndSet.[1])) +printfn "%A" ((getAndSet.[1])) // line 45 @"member-get-set-0.visp" let visp_result_todo = // line 45 @"member-get-set-0.visp" - printfn ("%A") (array) + printfn "%A" array // line 45 @"member-get-set-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_record-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_record-0.can parse.verified.txt index 3943ee6..6911340 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_record-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_record-0.can parse.verified.txt @@ -11,14 +11,14 @@ type Mapping = // line 13 @"record-0.visp" member this.Stuff () = // line 14 @"record-0.visp" - printfn ("doing stuff %A") ((this.src)) + printfn "doing stuff %A" ((this.src)) // line 17 @"record-0.visp" let temp = // line 17 @"record-0.visp" { src = 1; Mapping.dest = 2; range = 3 } // line 18 @"record-0.visp" -printfn ("Record is %A") (temp) +printfn "Record is %A" temp // line 19 @"record-0.visp" temp.Stuff() // line 21 @"record-0.visp" @@ -26,11 +26,11 @@ let temp2 = // line 21 @"record-0.visp" { src = 3; Mapping.dest = 5; range = 8 } // line 23 @"record-0.visp" -printfn ("Record is %A") (temp2) +printfn "Record is %A" temp2 // line 24 @"record-0.visp" temp2.Stuff() // line 27 @"record-0.visp" let visp_result_todo = () // line 27 @"record-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-0.can parse.verified.txt index 6fd860d..a48cc3b 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-0.can parse.verified.txt @@ -21,11 +21,11 @@ let myObject = // line 14 @"type-0.visp" (new MyType(99)) // line 16 @"type-0.visp" -printfn ("%O") (myObject) +printfn "%O" myObject // line 17 @"type-0.visp" let visp_result_todo = // line 17 @"type-0.visp" - printfn ("%O") ((myObject.Foo)) + printfn "%O" ((myObject.Foo)) // line 17 @"type-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-alias-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-alias-0.can parse.verified.txt index bc76190..885d371 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-alias-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_type-alias-0.can parse.verified.txt @@ -10,13 +10,13 @@ type range = int64*int64 // line 10 @"type-alias-0.visp" let things (r: range) = // line 11 @"type-alias-0.visp" - (fst (r)) + - (snd (r)) + (fst r) + + (snd r) // line 13 @"type-alias-0.visp" let visp_result_todo = // line 13 @"type-alias-0.visp" - printfn ("Result is %A") (things (1, 2)) + printfn "Result is %A" (things (1, 2)) // line 13 @"type-alias-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_union-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_union-0.can parse.verified.txt index a638f6a..3d1ba17 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_type_union-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_type_union-0.can parse.verified.txt @@ -28,7 +28,7 @@ type MyList<'a> = 0 | (Cons (_ , rest)) -> // line 21 @"union-0.visp" - (1) + + 1 + (rest.Length ()) // line 26 @"union-0.visp" @@ -36,11 +36,11 @@ let linkedList = // line 26 @"union-0.visp" Cons (1, Cons (2, Cons (3, Empty))) // line 28 @"union-0.visp" -printfn ("List is %A") (linkedList) +printfn "List is %A" linkedList // line 29 @"union-0.visp" -printfn ("List length %A") (linkedList.Length ()) +printfn "List length %A" (linkedList.Length ()) // line 30 @"union-0.visp" -printfn ("List isEmpty %A") (linkedList.TIsEmpty) +printfn "List isEmpty %A" linkedList.TIsEmpty [] // line 33 @"union-0.visp" type MyOption<'T> = @@ -54,13 +54,13 @@ let myOptNone = MyOption.None // line 39 @"union-0.visp" let myOptSome = // line 39 @"union-0.visp" - MyOption.Some (1) + MyOption.Some 1 // line 41 @"union-0.visp" -printfn ("myOptNone %A") (myOptNone) +printfn "myOptNone %A" myOptNone // line 42 @"union-0.visp" let visp_result_todo = // line 42 @"union-0.visp" - printfn ("myOptSome %A") (myOptSome) + printfn "myOptSome %A" myOptSome // line 42 @"union-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_vector_vector-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_vector_vector-0.can parse.verified.txt index 19cbecf..f798a72 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_vector_vector-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_vector_vector-0.can parse.verified.txt @@ -22,13 +22,13 @@ let empty = let temp = Vector(0) temp // line 11 @"vector-0.visp" -vec.[1] <- Value.int (-1) +vec.[1] <- Value.int -1 // line 13 @"vector-0.visp" -empty.Add(Value.int (99)) +empty.Add(Value.int 99) // line 15 @"vector-0.visp" -printfn ("%O") (empty) +printfn "%O" empty // line 17 @"vector-0.visp" let visp_result_todo = vec // line 17 @"vector-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-0.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-0.can parse.verified.txt index 17c9d57..e06d825 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-0.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-0.can parse.verified.txt @@ -10,8 +10,8 @@ let state = { Todo = () } // line 11 @"while-0.visp" let inc (v: Value) = // line 12 @"while-0.visp" - Value.from ((1L) + - (unwrapInt (v))) + Value.from (1L + + (unwrapInt v)) // line 14 @"while-0.visp" let count = @@ -22,9 +22,9 @@ let visp_result_todo = // line 15 @"while-0.visp" while CoreMethods.isTruthy(CoreMethods.``lt``(unwrapInt (deref (count)), 5L)) do // line 16 @"while-0.visp" - printfn ("in loop %O") (deref (count)) + printfn "in loop %O" (deref (count)) // line 17 @"while-0.visp" CoreMethods.``swap!``(Value.from(count), inc) // line 15 @"while-0.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo diff --git a/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-1.can parse.verified.txt b/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-1.can parse.verified.txt index 8358d56..66b3295 100644 --- a/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-1.can parse.verified.txt +++ b/tests/Visp.Compiler.UnitTests/snapshots/tests_while_while-1.can parse.verified.txt @@ -37,7 +37,7 @@ let inline DiffByOne (lhs: array<'T>) (rhs: array<'T>) = // line 17 @"while-1.visp" // line 17 @"while-1.visp" - diff <- inc (diff) + diff <- inc diff // line 20 @"while-1.visp" if CoreMethods.isTruthy( CoreMethods.``gt``(diff, 1)) @@ -47,14 +47,14 @@ let inline DiffByOne (lhs: array<'T>) (rhs: array<'T>) = // line 20 @"while-1.visp" loop <- false // line 23 @"while-1.visp" - index <- inc (index) + index <- inc index // line 26 @"while-1.visp" CoreMethods.``eq?``(diff, 1) // line 29 @"while-1.visp" let visp_result_todo = // line 29 @"while-1.visp" - printfn ("OK") + printfn "OK" // line 29 @"while-1.visp" -printfn ("%A") (visp_result_todo) +printfn "%A" visp_result_todo