diff --git a/scripts/format.sh b/scripts/format.sh index 2c1aa744fa..9c51f7c169 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -4,5 +4,5 @@ shopt -s extglob dune build @fmt --auto-promote -files=$(find runtime tests/tests -type f \( -name "*.res" -o -name "*.resi" \)) +files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*") ./rescript format $files diff --git a/scripts/format_check.sh b/scripts/format_check.sh index cd82ed6f5a..78d35db528 100755 --- a/scripts/format_check.sh +++ b/scripts/format_check.sh @@ -17,7 +17,7 @@ case "$(uname -s)" in fi echo "Checking ReScript code formatting..." - files=$(find runtime tests/tests -type f \( -name "*.res" -o -name "*.resi" \)) + files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*") if ./rescript format -check $files; then printf "${successGreen}✅ ReScript code formatting ok.${reset}\n" else diff --git a/tests/build_tests/cycle1/src/A.res b/tests/build_tests/cycle1/src/A.res index 237f168855..6394ca61bb 100644 --- a/tests/build_tests/cycle1/src/A.res +++ b/tests/build_tests/cycle1/src/A.res @@ -1,3 +1,3 @@ include A -let x = 42 \ No newline at end of file +let x = 42 diff --git a/tests/build_tests/cycle1/src/A.resi b/tests/build_tests/cycle1/src/A.resi index 86982fe068..64ba4c8287 100644 --- a/tests/build_tests/cycle1/src/A.resi +++ b/tests/build_tests/cycle1/src/A.resi @@ -1 +1 @@ -let x : int \ No newline at end of file +let x: int diff --git a/tests/build_tests/react_ppx/src/React.res b/tests/build_tests/react_ppx/src/React.res index ba3c322069..4350f6b2e5 100644 --- a/tests/build_tests/react_ppx/src/React.res +++ b/tests/build_tests/react_ppx/src/React.res @@ -108,7 +108,7 @@ module Suspense = { * only way to safely have any type of state and be able to update it correctly. */ @module("react") -external useState: ((unit => 'state)) => ('state, ('state => 'state) => unit) = "useState" +external useState: (unit => 'state) => ('state, ('state => 'state) => unit) = "useState" @module("react") external useReducer: (('state, 'action) => 'state, 'state) => ('state, 'action => unit) = @@ -122,118 +122,95 @@ external useReducerWithMapState: ( ) => ('state, 'action => unit) = "useReducer" @module("react") -external useEffect: ((unit => option unit>)) => unit = "useEffect" +external useEffect: (unit => option unit>) => unit = "useEffect" @module("react") -external useEffect0: ((unit => option unit>), @as(json`[]`) _) => unit = - "useEffect" +external useEffect0: (unit => option unit>, @as(json`[]`) _) => unit = "useEffect" @module("react") -external useEffect1: ((unit => option unit>), array<'a>) => unit = "useEffect" +external useEffect1: (unit => option unit>, array<'a>) => unit = "useEffect" @module("react") -external useEffect2: ((unit => option unit>), ('a, 'b)) => unit = "useEffect" +external useEffect2: (unit => option unit>, ('a, 'b)) => unit = "useEffect" @module("react") -external useEffect3: ((unit => option unit>), ('a, 'b, 'c)) => unit = "useEffect" +external useEffect3: (unit => option unit>, ('a, 'b, 'c)) => unit = "useEffect" @module("react") -external useEffect4: ((unit => option unit>), ('a, 'b, 'c, 'd)) => unit = - "useEffect" +external useEffect4: (unit => option unit>, ('a, 'b, 'c, 'd)) => unit = "useEffect" @module("react") -external useEffect5: ((unit => option unit>), ('a, 'b, 'c, 'd, 'e)) => unit = - "useEffect" +external useEffect5: (unit => option unit>, ('a, 'b, 'c, 'd, 'e)) => unit = "useEffect" @module("react") -external useEffect6: ((unit => option unit>), ('a, 'b, 'c, 'd, 'e, 'f)) => unit = - "useEffect" +external useEffect6: (unit => option unit>, ('a, 'b, 'c, 'd, 'e, 'f)) => unit = "useEffect" @module("react") -external useEffect7: ( - (unit => option unit>), - ('a, 'b, 'c, 'd, 'e, 'f, 'g), -) => unit = "useEffect" +external useEffect7: (unit => option unit>, ('a, 'b, 'c, 'd, 'e, 'f, 'g)) => unit = + "useEffect" @module("react") -external useLayoutEffect: ((unit => option unit>)) => unit = "useLayoutEffect" +external useLayoutEffect: (unit => option unit>) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect0: ((unit => option unit>), @as(json`[]`) _) => unit = +external useLayoutEffect0: (unit => option unit>, @as(json`[]`) _) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect1: ((unit => option unit>), array<'a>) => unit = - "useLayoutEffect" +external useLayoutEffect1: (unit => option unit>, array<'a>) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect2: ((unit => option unit>), ('a, 'b)) => unit = - "useLayoutEffect" +external useLayoutEffect2: (unit => option unit>, ('a, 'b)) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect3: ((unit => option unit>), ('a, 'b, 'c)) => unit = - "useLayoutEffect" +external useLayoutEffect3: (unit => option unit>, ('a, 'b, 'c)) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect4: ((unit => option unit>), ('a, 'b, 'c, 'd)) => unit = +external useLayoutEffect4: (unit => option unit>, ('a, 'b, 'c, 'd)) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect5: ((unit => option unit>), ('a, 'b, 'c, 'd, 'e)) => unit = +external useLayoutEffect5: (unit => option unit>, ('a, 'b, 'c, 'd, 'e)) => unit = "useLayoutEffect" @module("react") -external useLayoutEffect6: ( - (unit => option unit>), - ('a, 'b, 'c, 'd, 'e, 'f), -) => unit = "useLayoutEffect" +external useLayoutEffect6: (unit => option unit>, ('a, 'b, 'c, 'd, 'e, 'f)) => unit = + "useLayoutEffect" @module("react") -external useLayoutEffect7: ( - (unit => option unit>), - ('a, 'b, 'c, 'd, 'e, 'f, 'g), -) => unit = "useLayoutEffect" +external useLayoutEffect7: (unit => option unit>, ('a, 'b, 'c, 'd, 'e, 'f, 'g)) => unit = + "useLayoutEffect" @module("react") -external useMemo: ((unit => 'any)) => 'any = "useMemo" +external useMemo: (unit => 'any) => 'any = "useMemo" @module("react") -external useMemo0: ((unit => 'any), @as(json`[]`) _) => 'any = "useMemo" +external useMemo0: (unit => 'any, @as(json`[]`) _) => 'any = "useMemo" @module("react") -external useMemo1: ((unit => 'any), array<'a>) => 'any = "useMemo" +external useMemo1: (unit => 'any, array<'a>) => 'any = "useMemo" @module("react") -external useMemo2: ((unit => 'any), ('a, 'b)) => 'any = "useMemo" +external useMemo2: (unit => 'any, ('a, 'b)) => 'any = "useMemo" @module("react") -external useMemo3: ((unit => 'any), ('a, 'b, 'c)) => 'any = "useMemo" +external useMemo3: (unit => 'any, ('a, 'b, 'c)) => 'any = "useMemo" @module("react") -external useMemo4: ((unit => 'any), ('a, 'b, 'c, 'd)) => 'any = "useMemo" +external useMemo4: (unit => 'any, ('a, 'b, 'c, 'd)) => 'any = "useMemo" @module("react") -external useMemo5: ((unit => 'any), ('a, 'b, 'c, 'd, 'e)) => 'any = "useMemo" +external useMemo5: (unit => 'any, ('a, 'b, 'c, 'd, 'e)) => 'any = "useMemo" @module("react") -external useMemo6: ((unit => 'any), ('a, 'b, 'c, 'd, 'e, 'f)) => 'any = "useMemo" +external useMemo6: (unit => 'any, ('a, 'b, 'c, 'd, 'e, 'f)) => 'any = "useMemo" @module("react") -external useMemo7: ((unit => 'any), ('a, 'b, 'c, 'd, 'e, 'f, 'g)) => 'any = "useMemo" +external useMemo7: (unit => 'any, ('a, 'b, 'c, 'd, 'e, 'f, 'g)) => 'any = "useMemo" /* This is used as return values */ type callback<'input, 'output> = 'input => 'output @module("react") -external useCallback: (('input => 'output)) => callback<'input, 'output> = "useCallback" -@module("react") -external useCallback0: ( - ('input => 'output), - @as(json`[]`) _, -) => callback<'input, 'output> = "useCallback" +external useCallback: ('input => 'output) => callback<'input, 'output> = "useCallback" @module("react") -external useCallback1: (('input => 'output), array<'a>) => callback<'input, 'output> = +external useCallback0: ('input => 'output, @as(json`[]`) _) => callback<'input, 'output> = "useCallback" @module("react") -external useCallback2: (('input => 'output), ('a, 'b)) => callback<'input, 'output> = - "useCallback" +external useCallback1: ('input => 'output, array<'a>) => callback<'input, 'output> = "useCallback" +@module("react") +external useCallback2: ('input => 'output, ('a, 'b)) => callback<'input, 'output> = "useCallback" @module("react") -external useCallback3: (('input => 'output), ('a, 'b, 'c)) => callback<'input, 'output> = +external useCallback3: ('input => 'output, ('a, 'b, 'c)) => callback<'input, 'output> = "useCallback" @module("react") -external useCallback4: ( - ('input => 'output), - ('a, 'b, 'c, 'd), -) => callback<'input, 'output> = "useCallback" +external useCallback4: ('input => 'output, ('a, 'b, 'c, 'd)) => callback<'input, 'output> = + "useCallback" @module("react") -external useCallback5: ( - ('input => 'output), - ('a, 'b, 'c, 'd, 'e), -) => callback<'input, 'output> = "useCallback" +external useCallback5: ('input => 'output, ('a, 'b, 'c, 'd, 'e)) => callback<'input, 'output> = + "useCallback" @module("react") -external useCallback6: ( - ('input => 'output), - ('a, 'b, 'c, 'd, 'e, 'f), -) => callback<'input, 'output> = "useCallback" +external useCallback6: ('input => 'output, ('a, 'b, 'c, 'd, 'e, 'f)) => callback<'input, 'output> = + "useCallback" @module("react") external useCallback7: ( - ('input => 'output), + 'input => 'output, ('a, 'b, 'c, 'd, 'e, 'f, 'g), ) => callback<'input, 'output> = "useCallback" @@ -245,56 +222,50 @@ external useContext: Context.t<'any> => 'any = "useContext" @module("react") external useImperativeHandle0: ( Js.Nullable.t>, - (unit => 'value), + unit => 'value, @as(json`[]`) _, ) => unit = "useImperativeHandle" @module("react") -external useImperativeHandle1: ( - Js.Nullable.t>, - (unit => 'value), - array<'a>, -) => unit = "useImperativeHandle" +external useImperativeHandle1: (Js.Nullable.t>, unit => 'value, array<'a>) => unit = + "useImperativeHandle" @module("react") -external useImperativeHandle2: ( - Js.Nullable.t>, - (unit => 'value), - ('a, 'b), -) => unit = "useImperativeHandle" +external useImperativeHandle2: (Js.Nullable.t>, unit => 'value, ('a, 'b)) => unit = + "useImperativeHandle" @module("react") external useImperativeHandle3: ( Js.Nullable.t>, - (unit => 'value), + unit => 'value, ('a, 'b, 'c), ) => unit = "useImperativeHandle" @module("react") external useImperativeHandle4: ( Js.Nullable.t>, - (unit => 'value), + unit => 'value, ('a, 'b, 'c, 'd), ) => unit = "useImperativeHandle" @module("react") external useImperativeHandle5: ( Js.Nullable.t>, - (unit => 'value), + unit => 'value, ('a, 'b, 'c, 'd, 'e), ) => unit = "useImperativeHandle" @module("react") external useImperativeHandle6: ( Js.Nullable.t>, - (unit => 'value), + unit => 'value, ('a, 'b, 'c, 'd, 'e, 'f), ) => unit = "useImperativeHandle" @module("react") external useImperativeHandle7: ( Js.Nullable.t>, - (unit => 'value), + unit => 'value, ('a, 'b, 'c, 'd, 'e, 'f, 'g), ) => unit = "useImperativeHandle" diff --git a/tests/build_tests/react_ppx/src/gpr_3987_test.res b/tests/build_tests/react_ppx/src/gpr_3987_test.res index 9adb8c3186..6b73ce7a6c 100644 --- a/tests/build_tests/react_ppx/src/gpr_3987_test.res +++ b/tests/build_tests/react_ppx/src/gpr_3987_test.res @@ -24,27 +24,27 @@ let makeContainer = text => { /* This uncurried prop definition compiles */ module Gpr3987ReproOk = { - type props = {value: string, onChange: (. string, int) => unit} + type props = {value: string, onChange: (string, int) => unit} let make = (_props: props) => React.null } -let _ = ()} /> +let _ = ()} /> /* Extracted type for the uncurried prop compiles as well */ module Gpr3987ReproOk2 = { - type onChange = (. string, int) => unit + type onChange = (string, int) => unit @react.component let make = (~value as _, ~onChange as _: onChange) => React.null } -let _ = ()} /> +let _ = ()} /> /* Inline uncurried prop type causes an error */ module Gpr3987ReproError = { @react.component - let make = (~value as _: string, ~onChange as _: (. string, int) => unit) => React.null + let make = (~value as _: string, ~onChange as _: (string, int) => unit) => React.null } -let _ = ()} /> +let _ = ()} /> diff --git a/tests/build_tests/react_ppx/src/recursive_component_test.res b/tests/build_tests/react_ppx/src/recursive_component_test.res index 90eeffe167..bdf0dcee2a 100644 --- a/tests/build_tests/react_ppx/src/recursive_component_test.res +++ b/tests/build_tests/react_ppx/src/recursive_component_test.res @@ -8,7 +8,7 @@ module Rec = { @react.component let rec make = (~b) => { - mm({b:b}) + mm({b: b}) } - and mm = (x) => make({b: ! x.b}) + and mm = x => make({b: !x.b}) } diff --git a/tests/build_tests/super_errors/expected/RecordInclusion.res.expected b/tests/build_tests/super_errors/expected/RecordInclusion.res.expected index 7f3f6db28a..19232b7660 100644 --- a/tests/build_tests/super_errors/expected/RecordInclusion.res.expected +++ b/tests/build_tests/super_errors/expected/RecordInclusion.res.expected @@ -2,10 +2,10 @@ We've found a bug for you! /.../fixtures/RecordInclusion.res:3:5-5:1 - 1 │ module M : { - 2 │ type t<'a, 'b, 'c> = {x:int, y:list<('a, 'b)>, z:int} + 1 │ module M: { + 2 │ type t<'a, 'b, 'c> = {x: int, y: list<('a, 'b)>, z: int} 3 │ } = { - 4 │  type t<'a, 'b, 'c> = {x:int, y:list<('a, 'c)>, z:int} + 4 │  type t<'a, 'b, 'c> = {x: int, y: list<('a, 'c)>, z: int} 5 │ } 6 │ @@ -15,8 +15,8 @@ type t<'a, 'b, 'c> = {x: int, y: list<('a, 'c)>, z: int} is not included in type t<'a, 'b, 'c> = {x: int, y: list<('a, 'b)>, z: int} - /.../fixtures/RecordInclusion.res:2:3-55: + /.../fixtures/RecordInclusion.res:2:3-58: Expected declaration - /.../fixtures/RecordInclusion.res:4:3-55: + /.../fixtures/RecordInclusion.res:4:3-58: Actual declaration The types for field y are not equal. \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/UncurriedArgsNotApplied.res.expected b/tests/build_tests/super_errors/expected/UncurriedArgsNotApplied.res.expected index 6a7d407db0..211ea74274 100644 --- a/tests/build_tests/super_errors/expected/UncurriedArgsNotApplied.res.expected +++ b/tests/build_tests/super_errors/expected/UncurriedArgsNotApplied.res.expected @@ -2,7 +2,7 @@ We've found a bug for you! /.../fixtures/UncurriedArgsNotApplied.res:3:15-21 - 1 │ let apply = (fn: (. unit) => option) => fn(. ()) + 1 │ let apply = (fn: unit => option) => fn() 2 │ 3 │ let _ = apply(Some(1)) 4 │ diff --git a/tests/build_tests/super_errors/expected/UntaggedImplIntf.res.expected b/tests/build_tests/super_errors/expected/UntaggedImplIntf.res.expected index ffdcb9713f..cf1b4620aa 100644 --- a/tests/build_tests/super_errors/expected/UntaggedImplIntf.res.expected +++ b/tests/build_tests/super_errors/expected/UntaggedImplIntf.res.expected @@ -7,6 +7,7 @@ 3 │ } = { 4 │  type t = | @as(null) A 5 │ } + 6 │ Signature mismatch: Modules do not match: diff --git a/tests/build_tests/super_errors/expected/arity_mismatch.res.expected b/tests/build_tests/super_errors/expected/arity_mismatch.res.expected index 847488a6ea..0bef35b03c 100644 --- a/tests/build_tests/super_errors/expected/arity_mismatch.res.expected +++ b/tests/build_tests/super_errors/expected/arity_mismatch.res.expected @@ -2,8 +2,8 @@ We've found a bug for you! /.../fixtures/arity_mismatch.res:2:21-27 - 1 │ let makeVar = (. ~f, ()) => 34 - 2 │ let makeVariables = makeVar(.~f=f => f) + 1 │ let makeVar = (~f, ()) => 34 + 2 │ let makeVariables = makeVar(~f=f => f) 3 │ This function has type (~f: 'a => 'a, unit) => int diff --git a/tests/build_tests/super_errors/expected/arity_mismatch2.res.expected b/tests/build_tests/super_errors/expected/arity_mismatch2.res.expected index 3eb99fe236..2792426982 100644 --- a/tests/build_tests/super_errors/expected/arity_mismatch2.res.expected +++ b/tests/build_tests/super_errors/expected/arity_mismatch2.res.expected @@ -2,8 +2,8 @@ We've found a bug for you! /.../fixtures/arity_mismatch2.res:2:21-27 - 1 │ let makeVar = (. f, ()) => 34 - 2 │ let makeVariables = makeVar(. 1, 2, 3) + 1 │ let makeVar = (f, ()) => 34 + 2 │ let makeVariables = makeVar(1, 2, 3) 3 │ This function has type ('a, unit) => int diff --git a/tests/build_tests/super_errors/expected/curried_expected.res.expected b/tests/build_tests/super_errors/expected/curried_expected.res.expected index e0c22e9668..79438d1b9d 100644 --- a/tests/build_tests/super_errors/expected/curried_expected.res.expected +++ b/tests/build_tests/super_errors/expected/curried_expected.res.expected @@ -4,7 +4,7 @@ 1 │ let expectCurried = f => f(1) + 2 2 │ - 3 │ let z1 = expectCurried((. x, y) => x+y) + 3 │ let z1 = expectCurried((x, y) => x + y) 4 │ This function expected 1 argument, but got 2 \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/dict_record_style_field_access.res.expected b/tests/build_tests/super_errors/expected/dict_record_style_field_access.res.expected index f9bcfc32dc..092a02346f 100644 --- a/tests/build_tests/super_errors/expected/dict_record_style_field_access.res.expected +++ b/tests/build_tests/super_errors/expected/dict_record_style_field_access.res.expected @@ -5,5 +5,6 @@ 3 │ } 4 │ 5 │ let x = stringDict.name + 6 │ Direct field access on a dict is not supported. Use Dict.get instead. \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/highlighting2.res.expected b/tests/build_tests/super_errors/expected/highlighting2.res.expected index ddce9938c6..3701c234bb 100644 --- a/tests/build_tests/super_errors/expected/highlighting2.res.expected +++ b/tests/build_tests/super_errors/expected/highlighting2.res.expected @@ -1,12 +1,11 @@ We've found a bug for you! - /.../fixtures/highlighting2.res:2:36-4:25 + /.../fixtures/highlighting2.res:1:14-3:25 - 1 ┆ - 2 ┆ let a: int = "hel - 3 ┆ - 4 ┆ lo" - 5 ┆ + 1 │ let a: int = "hel + 2 │ + 3 │  lo" + 4 │ This has type: string But it's expected to have type: int diff --git a/tests/build_tests/super_errors/expected/highlighting3.res.expected b/tests/build_tests/super_errors/expected/highlighting3.res.expected index ad49ca150d..7845aa238d 100644 --- a/tests/build_tests/super_errors/expected/highlighting3.res.expected +++ b/tests/build_tests/super_errors/expected/highlighting3.res.expected @@ -1,12 +1,11 @@ We've found a bug for you! - /.../fixtures/highlighting3.res:2:14-4:16 + /.../fixtures/highlighting3.res:1:14-3:16 - 1 │ - 2 │ let a: int = "helllllll - 3 │ - 4 │ loooooooooooooo" - 5 │ + 1 │ let a: int = "helllllll + 2 │ + 3 │ loooooooooooooo" + 4 │ This has type: string But it's expected to have type: int diff --git a/tests/build_tests/super_errors/expected/intoverflow.res.expected b/tests/build_tests/super_errors/expected/intoverflow.res.expected index abf0e9f449..a0ef2bff85 100644 --- a/tests/build_tests/super_errors/expected/intoverflow.res.expected +++ b/tests/build_tests/super_errors/expected/intoverflow.res.expected @@ -35,23 +35,23 @@ Warning number 107 - /.../fixtures/intoverflow.res:11:14-26 + /.../fixtures/intoverflow.res:11:15-27 9 │ let v7: int = 0xFFFF_FFFF // -1 10 │ let v8: int = -0xFFFF_FFFF // 1 - 11 │ let v9:int = 0x1_0000_0000 // overflow - 12 │ let v10:int = -0x1_0000_0000 // underflow + 11 │ let v9: int = 0x1_0000_0000 // overflow + 12 │ let v10: int = -0x1_0000_0000 // underflow 13 │ Integer literal exceeds the range of representable integers of type int Warning number 107 - /.../fixtures/intoverflow.res:12:16-28 + /.../fixtures/intoverflow.res:12:17-29 10 │ let v8: int = -0xFFFF_FFFF // 1 - 11 │ let v9:int = 0x1_0000_0000 // overflow - 12 │ let v10:int = -0x1_0000_0000 // underflow + 11 │ let v9: int = 0x1_0000_0000 // overflow + 12 │ let v10: int = -0x1_0000_0000 // underflow 13 │ Integer literal exceeds the range of representable integers of type int \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/jinterp.res.expected b/tests/build_tests/super_errors/expected/jinterp.res.expected index 82d06d2f91..7998ef1ef3 100644 --- a/tests/build_tests/super_errors/expected/jinterp.res.expected +++ b/tests/build_tests/super_errors/expected/jinterp.res.expected @@ -1,9 +1,9 @@ We've found a bug for you! - /.../fixtures/jinterp.res:3:9 + /.../fixtures/jinterp.res:2:9 - 1 │ - 2 │ let a = 11 - 3 │ let b = j`number $(a)` + 1 │ let a = 11 + 2 │ let b = j`number $(a)` + 3 │ The value j can't be found \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/method_arity_mismatch.res.expected b/tests/build_tests/super_errors/expected/method_arity_mismatch.res.expected index fd3720d4ef..62429ee2f4 100644 --- a/tests/build_tests/super_errors/expected/method_arity_mismatch.res.expected +++ b/tests/build_tests/super_errors/expected/method_arity_mismatch.res.expected @@ -3,8 +3,8 @@ /.../fixtures/method_arity_mismatch.res:3:3-11 1 │ let f = obj => { - 2 │ obj["hi"](.1, 2) - 3 │ obj["hi"](.1) + 2 │ obj["hi"](1, 2) + 3 │ obj["hi"](1) 4 │ } 5 │ diff --git a/tests/build_tests/super_errors/expected/non_function_uncurried_apply.res.expected b/tests/build_tests/super_errors/expected/non_function_uncurried_apply.res.expected index b44fdb3af1..3d1381d80f 100644 --- a/tests/build_tests/super_errors/expected/non_function_uncurried_apply.res.expected +++ b/tests/build_tests/super_errors/expected/non_function_uncurried_apply.res.expected @@ -3,7 +3,7 @@ /.../fixtures/non_function_uncurried_apply.res:2:9-14 1 │ let nonfun = 2 - 2 │ let _ = nonfun(. 3) + 2 │ let _ = nonfun(3) 3 │ This expression has type int diff --git a/tests/build_tests/super_errors/expected/recursive_type.res.expected b/tests/build_tests/super_errors/expected/recursive_type.res.expected index 714cd2e515..9631bcfa3f 100644 --- a/tests/build_tests/super_errors/expected/recursive_type.res.expected +++ b/tests/build_tests/super_errors/expected/recursive_type.res.expected @@ -1,12 +1,12 @@ We've found a bug for you! - /.../fixtures/recursive_type.res:35:11-14 + /.../fixtures/recursive_type.res:34:11-14 - 33 │ /* parse atom */ - 34 │ and atom = (k, t) => { - 35 │ let _ = atom(k) - 36 │ assert(false) - 37 │ } + 32 │ /* parse atom */ + 33 │ and atom = (k, t) => { + 34 │ let _ = atom(k) + 35 │ assert(false) + 36 │ } This function has type ((option<'a>, ([> #List(list<'b>)] as 'b)) => 'c, 'd) => 'c diff --git a/tests/build_tests/super_errors/expected/uncurried_wrong_label.res.expected b/tests/build_tests/super_errors/expected/uncurried_wrong_label.res.expected index 2ce03713d5..2c3bd273d4 100644 --- a/tests/build_tests/super_errors/expected/uncurried_wrong_label.res.expected +++ b/tests/build_tests/super_errors/expected/uncurried_wrong_label.res.expected @@ -1,11 +1,11 @@ We've found a bug for you! - /.../fixtures/uncurried_wrong_label.res:3:18 + /.../fixtures/uncurried_wrong_label.res:6:16 - 1 │ let foo = (. ~x) => { let _ = (); (~y) => x+y } - 2 │ // This looks too far into the return type - 3 │ let d = foo(. ~y=3) - 4 │ + 4 │ } + 5 │ // This looks too far into the return type + 6 │ let d = foo(~y=3) + 7 │ The function applied to this argument has type (~x: int) => (~y: int) => int diff --git a/tests/build_tests/super_errors/expected/unicode_location.res.expected b/tests/build_tests/super_errors/expected/unicode_location.res.expected index a8e39cf3ca..b228a653ed 100644 --- a/tests/build_tests/super_errors/expected/unicode_location.res.expected +++ b/tests/build_tests/super_errors/expected/unicode_location.res.expected @@ -5,6 +5,7 @@ 1 │ let q = "💩💩💩💩💩💩💩💩����💩" ++ ("a" ++ 3 ++ "b") 2 │ // ^ character position 33 + 10 │ (unicode symbols of length 2) + 3 │ This has type: int But this function argument is expecting: string diff --git a/tests/build_tests/super_errors/expected/unknown_tagged_template_function.res.expected b/tests/build_tests/super_errors/expected/unknown_tagged_template_function.res.expected index 5b5c2f816b..dd316c3f5f 100644 --- a/tests/build_tests/super_errors/expected/unknown_tagged_template_function.res.expected +++ b/tests/build_tests/super_errors/expected/unknown_tagged_template_function.res.expected @@ -3,5 +3,6 @@ /.../fixtures/unknown_tagged_template_function.res:1:11-14 1 │ let res = tagg`| 5 × 10 = ${5} |` + 2 │ The value tagg can't be found \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/variant_spread_inline_records.res.expected b/tests/build_tests/super_errors/expected/variant_spread_inline_records.res.expected index f34a0fa42a..2b2d0b17d5 100644 --- a/tests/build_tests/super_errors/expected/variant_spread_inline_records.res.expected +++ b/tests/build_tests/super_errors/expected/variant_spread_inline_records.res.expected @@ -5,5 +5,6 @@ 2 │ type b = | ...a | Three 3 │ 4 │ let b: b = One({name: "hello"}) + 5 │ Some required record fields are missing: age. \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/variant_spread_type_parameters.res.expected b/tests/build_tests/super_errors/expected/variant_spread_type_parameters.res.expected index 99738ba67a..14103e55d9 100644 --- a/tests/build_tests/super_errors/expected/variant_spread_type_parameters.res.expected +++ b/tests/build_tests/super_errors/expected/variant_spread_type_parameters.res.expected @@ -4,5 +4,6 @@ 1 │ type a<'a> = One | Two('a) 2 │ type b = | ...a | Three + 3 │ Type parameters are not supported in variant type spreads. \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/warnings4.res.expected b/tests/build_tests/super_errors/expected/warnings4.res.expected index f294e441b1..0e45f5b371 100644 --- a/tests/build_tests/super_errors/expected/warnings4.res.expected +++ b/tests/build_tests/super_errors/expected/warnings4.res.expected @@ -5,7 +5,7 @@ 9 │ @val external x: myType = "myVariable" 10 │ 11 │ switch x { - 12 │  | #first => Js.log("first") + 12 │ | #first => Js.log("first") 13 │ } 14 │ diff --git a/tests/build_tests/super_errors/fixtures/RecordInclusion.res b/tests/build_tests/super_errors/fixtures/RecordInclusion.res index c8d366ca7c..f538f0480c 100644 --- a/tests/build_tests/super_errors/fixtures/RecordInclusion.res +++ b/tests/build_tests/super_errors/fixtures/RecordInclusion.res @@ -1,5 +1,5 @@ -module M : { - type t<'a, 'b, 'c> = {x:int, y:list<('a, 'b)>, z:int} +module M: { + type t<'a, 'b, 'c> = {x: int, y: list<('a, 'b)>, z: int} } = { - type t<'a, 'b, 'c> = {x:int, y:list<('a, 'c)>, z:int} + type t<'a, 'b, 'c> = {x: int, y: list<('a, 'c)>, z: int} } diff --git a/tests/build_tests/super_errors/fixtures/UncurriedArgsNotApplied.res b/tests/build_tests/super_errors/fixtures/UncurriedArgsNotApplied.res index 0d8be7204e..acb61b83e8 100644 --- a/tests/build_tests/super_errors/fixtures/UncurriedArgsNotApplied.res +++ b/tests/build_tests/super_errors/fixtures/UncurriedArgsNotApplied.res @@ -1,3 +1,3 @@ -let apply = (fn: (. unit) => option) => fn(. ()) +let apply = (fn: unit => option) => fn() let _ = apply(Some(1)) diff --git a/tests/build_tests/super_errors/fixtures/UntaggedImplIntf.res b/tests/build_tests/super_errors/fixtures/UntaggedImplIntf.res index 6d269fedf6..4c860d830c 100644 --- a/tests/build_tests/super_errors/fixtures/UntaggedImplIntf.res +++ b/tests/build_tests/super_errors/fixtures/UntaggedImplIntf.res @@ -2,4 +2,4 @@ module M: { @unboxed type t = | @as(null) A } = { type t = | @as(null) A -} \ No newline at end of file +} diff --git a/tests/build_tests/super_errors/fixtures/arity_mismatch.res b/tests/build_tests/super_errors/fixtures/arity_mismatch.res index 7ca22b2d42..70140a27fd 100644 --- a/tests/build_tests/super_errors/fixtures/arity_mismatch.res +++ b/tests/build_tests/super_errors/fixtures/arity_mismatch.res @@ -1,2 +1,2 @@ -let makeVar = (. ~f, ()) => 34 -let makeVariables = makeVar(.~f=f => f) +let makeVar = (~f, ()) => 34 +let makeVariables = makeVar(~f=f => f) diff --git a/tests/build_tests/super_errors/fixtures/arity_mismatch2.res b/tests/build_tests/super_errors/fixtures/arity_mismatch2.res index 7f22a21dee..1434aef73a 100644 --- a/tests/build_tests/super_errors/fixtures/arity_mismatch2.res +++ b/tests/build_tests/super_errors/fixtures/arity_mismatch2.res @@ -1,2 +1,2 @@ -let makeVar = (. f, ()) => 34 -let makeVariables = makeVar(. 1, 2, 3) +let makeVar = (f, ()) => 34 +let makeVariables = makeVar(1, 2, 3) diff --git a/tests/build_tests/super_errors/fixtures/c_for_u_in_c_mode.res b/tests/build_tests/super_errors/fixtures/c_for_u_in_c_mode.res index ed0ff1515d..1133226dd6 100644 --- a/tests/build_tests/super_errors/fixtures/c_for_u_in_c_mode.res +++ b/tests/build_tests/super_errors/fixtures/c_for_u_in_c_mode.res @@ -1,5 +1,5 @@ module Foo: { - let add: (. int, int) => int + let add: (int, int) => int } = { let add = (a, b) => a + b } diff --git a/tests/build_tests/super_errors/fixtures/c_for_u_in_u_mode.res b/tests/build_tests/super_errors/fixtures/c_for_u_in_u_mode.res index 77c4a266d1..f30128349f 100644 --- a/tests/build_tests/super_errors/fixtures/c_for_u_in_u_mode.res +++ b/tests/build_tests/super_errors/fixtures/c_for_u_in_u_mode.res @@ -3,5 +3,5 @@ module Foo: { let add: (int, int) => int } = { - let add = (. a, b) => a + b + let add = (a, b) => a + b } diff --git a/tests/build_tests/super_errors/fixtures/curried_expected.res b/tests/build_tests/super_errors/fixtures/curried_expected.res index 224d432a15..bfef7f817b 100644 --- a/tests/build_tests/super_errors/fixtures/curried_expected.res +++ b/tests/build_tests/super_errors/fixtures/curried_expected.res @@ -1,3 +1,3 @@ let expectCurried = f => f(1) + 2 -let z1 = expectCurried((. x, y) => x+y) +let z1 = expectCurried((x, y) => x + y) diff --git a/tests/build_tests/super_errors/fixtures/curry_in_uncurry.res b/tests/build_tests/super_errors/fixtures/curry_in_uncurry.res index 3a858b9ea6..0c0c3b67e1 100644 --- a/tests/build_tests/super_errors/fixtures/curry_in_uncurry.res +++ b/tests/build_tests/super_errors/fixtures/curry_in_uncurry.res @@ -1,3 +1,3 @@ let f = (a, b) => a + b -f(. 2, 2)->Js.log +f(2, 2)->Js.log diff --git a/tests/build_tests/super_errors/fixtures/dict_record_style_field_access.res b/tests/build_tests/super_errors/fixtures/dict_record_style_field_access.res index af20f04b3c..01f2b6753f 100644 --- a/tests/build_tests/super_errors/fixtures/dict_record_style_field_access.res +++ b/tests/build_tests/super_errors/fixtures/dict_record_style_field_access.res @@ -2,4 +2,4 @@ let stringDict = dict{ "name": "hello", } -let x = stringDict.name \ No newline at end of file +let x = stringDict.name diff --git a/tests/build_tests/super_errors/fixtures/fieldNotOptional.res b/tests/build_tests/super_errors/fixtures/fieldNotOptional.res index e653cbd9e6..cfa0060bb5 100644 --- a/tests/build_tests/super_errors/fixtures/fieldNotOptional.res +++ b/tests/build_tests/super_errors/fixtures/fieldNotOptional.res @@ -13,5 +13,5 @@ let vi = A({nonopt: ?3, opt: ?None}) let fi = a => switch a { - | A ({nonopt: ?_, opt: ?_}) => true - } \ No newline at end of file + | A({nonopt: ?_, opt: ?_}) => true + } diff --git a/tests/build_tests/super_errors/fixtures/highlighting2.res b/tests/build_tests/super_errors/fixtures/highlighting2.res index 52dacee1c5..28ef0e5ced 100644 --- a/tests/build_tests/super_errors/fixtures/highlighting2.res +++ b/tests/build_tests/super_errors/fixtures/highlighting2.res @@ -1,4 +1,3 @@ - - let a: int = "hel +let a: int = "hel lo" diff --git a/tests/build_tests/super_errors/fixtures/highlighting3.res b/tests/build_tests/super_errors/fixtures/highlighting3.res index b781381cf5..6e27b8e07c 100644 --- a/tests/build_tests/super_errors/fixtures/highlighting3.res +++ b/tests/build_tests/super_errors/fixtures/highlighting3.res @@ -1,4 +1,3 @@ - let a: int = "helllllll loooooooooooooo" diff --git a/tests/build_tests/super_errors/fixtures/intoverflow.res b/tests/build_tests/super_errors/fixtures/intoverflow.res index b1b3981e8a..4bdee11d6a 100644 --- a/tests/build_tests/super_errors/fixtures/intoverflow.res +++ b/tests/build_tests/super_errors/fixtures/intoverflow.res @@ -8,5 +8,5 @@ let v6: int = -2_147_483_649 // underflow // hex let v7: int = 0xFFFF_FFFF // -1 let v8: int = -0xFFFF_FFFF // 1 -let v9:int = 0x1_0000_0000 // overflow -let v10:int = -0x1_0000_0000 // underflow +let v9: int = 0x1_0000_0000 // overflow +let v10: int = -0x1_0000_0000 // underflow diff --git a/tests/build_tests/super_errors/fixtures/jinterp.res b/tests/build_tests/super_errors/fixtures/jinterp.res index cd6608feed..41255bdbd9 100644 --- a/tests/build_tests/super_errors/fixtures/jinterp.res +++ b/tests/build_tests/super_errors/fixtures/jinterp.res @@ -1,3 +1,2 @@ - let a = 11 -let b = j`number $(a)` \ No newline at end of file +let b = j`number $(a)` diff --git a/tests/build_tests/super_errors/fixtures/method_arity_mismatch.res b/tests/build_tests/super_errors/fixtures/method_arity_mismatch.res index d50b393fb4..e0f481abac 100644 --- a/tests/build_tests/super_errors/fixtures/method_arity_mismatch.res +++ b/tests/build_tests/super_errors/fixtures/method_arity_mismatch.res @@ -1,4 +1,4 @@ let f = obj => { - obj["hi"](.1, 2) - obj["hi"](.1) + obj["hi"](1, 2) + obj["hi"](1) } diff --git a/tests/build_tests/super_errors/fixtures/non_function_uncurried_apply.res b/tests/build_tests/super_errors/fixtures/non_function_uncurried_apply.res index da97632482..cde4dc4cf9 100644 --- a/tests/build_tests/super_errors/fixtures/non_function_uncurried_apply.res +++ b/tests/build_tests/super_errors/fixtures/non_function_uncurried_apply.res @@ -1,2 +1,2 @@ let nonfun = 2 -let _ = nonfun(. 3) +let _ = nonfun(3) diff --git a/tests/build_tests/super_errors/fixtures/recursive_type.res b/tests/build_tests/super_errors/fixtures/recursive_type.res index b21eb02b34..0a14eca45f 100644 --- a/tests/build_tests/super_errors/fixtures/recursive_type.res +++ b/tests/build_tests/super_errors/fixtures/recursive_type.res @@ -8,7 +8,6 @@ type sexp = tt /* {2 Serialization (encoding)} */ - let rec expr_starting_with = (c, k, t) => switch c { | '(' => expr_list(list{}, k, t) @@ -34,4 +33,4 @@ and expr_list = (acc, k, t) => { and atom = (k, t) => { let _ = atom(k) assert(false) -} \ No newline at end of file +} diff --git a/tests/build_tests/super_errors/fixtures/u_for_c_in_c_mode.res b/tests/build_tests/super_errors/fixtures/u_for_c_in_c_mode.res index f1da111c85..1133226dd6 100644 --- a/tests/build_tests/super_errors/fixtures/u_for_c_in_c_mode.res +++ b/tests/build_tests/super_errors/fixtures/u_for_c_in_c_mode.res @@ -1,5 +1,5 @@ module Foo: { let add: (int, int) => int } = { - let add = (. a, b) => a + b + let add = (a, b) => a + b } diff --git a/tests/build_tests/super_errors/fixtures/u_for_c_in_u_mode.res b/tests/build_tests/super_errors/fixtures/u_for_c_in_u_mode.res index a7baf943cd..f30128349f 100644 --- a/tests/build_tests/super_errors/fixtures/u_for_c_in_u_mode.res +++ b/tests/build_tests/super_errors/fixtures/u_for_c_in_u_mode.res @@ -1,7 +1,7 @@ @@uncurried module Foo: { - let add: (. int, int) => int + let add: (int, int) => int } = { let add = (a, b) => a + b } diff --git a/tests/build_tests/super_errors/fixtures/uncurried_expected.res b/tests/build_tests/super_errors/fixtures/uncurried_expected.res index 6fad3ef0ab..732389d946 100644 --- a/tests/build_tests/super_errors/fixtures/uncurried_expected.res +++ b/tests/build_tests/super_errors/fixtures/uncurried_expected.res @@ -1,2 +1,2 @@ -let apply = (f) => f(. 1) -let z = apply(x => x+1) +let apply = f => f(1) +let z = apply(x => x + 1) diff --git a/tests/build_tests/super_errors/fixtures/uncurried_wrong_label.res b/tests/build_tests/super_errors/fixtures/uncurried_wrong_label.res index aaa374699c..944ba5528d 100644 --- a/tests/build_tests/super_errors/fixtures/uncurried_wrong_label.res +++ b/tests/build_tests/super_errors/fixtures/uncurried_wrong_label.res @@ -1,3 +1,6 @@ -let foo = (. ~x) => { let _ = (); (~y) => x+y } +let foo = (~x) => { + let _ = () + (~y) => x + y +} // This looks too far into the return type -let d = foo(. ~y=3) +let d = foo(~y=3) diff --git a/tests/build_tests/super_errors/fixtures/unicode_location.res b/tests/build_tests/super_errors/fixtures/unicode_location.res index e64643ca36..15b825420a 100644 --- a/tests/build_tests/super_errors/fixtures/unicode_location.res +++ b/tests/build_tests/super_errors/fixtures/unicode_location.res @@ -1,2 +1,2 @@ let q = "💩💩💩💩💩💩💩💩💩💩" ++ ("a" ++ 3 ++ "b") -// ^ character position 33 + 10 (unicode symbols of length 2) \ No newline at end of file +// ^ character position 33 + 10 (unicode symbols of length 2) diff --git a/tests/build_tests/super_errors/fixtures/unknown_tagged_template_function.res b/tests/build_tests/super_errors/fixtures/unknown_tagged_template_function.res index 40a9532ace..75cc773a11 100644 --- a/tests/build_tests/super_errors/fixtures/unknown_tagged_template_function.res +++ b/tests/build_tests/super_errors/fixtures/unknown_tagged_template_function.res @@ -1 +1 @@ -let res = tagg`| 5 × 10 = ${5} |` \ No newline at end of file +let res = tagg`| 5 × 10 = ${5} |` diff --git a/tests/build_tests/super_errors/fixtures/variant_spread_inline_records.res b/tests/build_tests/super_errors/fixtures/variant_spread_inline_records.res index 1d057972b0..58c4d765fb 100644 --- a/tests/build_tests/super_errors/fixtures/variant_spread_inline_records.res +++ b/tests/build_tests/super_errors/fixtures/variant_spread_inline_records.res @@ -1,4 +1,4 @@ type a = One({name: string, age: int}) | Two type b = | ...a | Three -let b: b = One({name: "hello"}) \ No newline at end of file +let b: b = One({name: "hello"}) diff --git a/tests/build_tests/super_errors/fixtures/variant_spread_type_parameters.res b/tests/build_tests/super_errors/fixtures/variant_spread_type_parameters.res index 118789f66c..c6a31eebbc 100644 --- a/tests/build_tests/super_errors/fixtures/variant_spread_type_parameters.res +++ b/tests/build_tests/super_errors/fixtures/variant_spread_type_parameters.res @@ -1,2 +1,2 @@ type a<'a> = One | Two('a) -type b = | ...a | Three \ No newline at end of file +type b = | ...a | Three diff --git a/tests/build_tests/super_errors/fixtures/warnings4.res b/tests/build_tests/super_errors/fixtures/warnings4.res index 326f2a10cd..3c65caefe2 100644 --- a/tests/build_tests/super_errors/fixtures/warnings4.res +++ b/tests/build_tests/super_errors/fixtures/warnings4.res @@ -9,5 +9,5 @@ type myType = [ @val external x: myType = "myVariable" switch x { - | #first => Js.log("first") +| #first => Js.log("first") } diff --git a/tests/build_tests/transitive_pinned_dependency1/a/src/src.res b/tests/build_tests/transitive_pinned_dependency1/a/src/src.res index 487a974bff..95733e46af 100644 --- a/tests/build_tests/transitive_pinned_dependency1/a/src/src.res +++ b/tests/build_tests/transitive_pinned_dependency1/a/src/src.res @@ -1 +1 @@ -Js.Console.log("src") \ No newline at end of file +Js.Console.log("src") diff --git a/tests/build_tests/transitive_pinned_dependency1/a/tests/test.res b/tests/build_tests/transitive_pinned_dependency1/a/tests/test.res index fd01e9ef06..aa7a48d65d 100644 --- a/tests/build_tests/transitive_pinned_dependency1/a/tests/test.res +++ b/tests/build_tests/transitive_pinned_dependency1/a/tests/test.res @@ -1 +1 @@ -Js.Console.log("test") \ No newline at end of file +Js.Console.log("test") diff --git a/tests/build_tests/transitive_pinned_dependency1/node_modules/b/src/src.res b/tests/build_tests/transitive_pinned_dependency1/node_modules/b/src/src.res index 487a974bff..95733e46af 100644 --- a/tests/build_tests/transitive_pinned_dependency1/node_modules/b/src/src.res +++ b/tests/build_tests/transitive_pinned_dependency1/node_modules/b/src/src.res @@ -1 +1 @@ -Js.Console.log("src") \ No newline at end of file +Js.Console.log("src") diff --git a/tests/build_tests/transitive_pinned_dependency1/node_modules/b/tests/test.res b/tests/build_tests/transitive_pinned_dependency1/node_modules/b/tests/test.res index fd01e9ef06..aa7a48d65d 100644 --- a/tests/build_tests/transitive_pinned_dependency1/node_modules/b/tests/test.res +++ b/tests/build_tests/transitive_pinned_dependency1/node_modules/b/tests/test.res @@ -1 +1 @@ -Js.Console.log("test") \ No newline at end of file +Js.Console.log("test") diff --git a/tests/build_tests/transitive_pinned_dependency1/node_modules/c/src/src.res b/tests/build_tests/transitive_pinned_dependency1/node_modules/c/src/src.res index 487a974bff..95733e46af 100644 --- a/tests/build_tests/transitive_pinned_dependency1/node_modules/c/src/src.res +++ b/tests/build_tests/transitive_pinned_dependency1/node_modules/c/src/src.res @@ -1 +1 @@ -Js.Console.log("src") \ No newline at end of file +Js.Console.log("src") diff --git a/tests/build_tests/transitive_pinned_dependency1/node_modules/c/tests/test.res b/tests/build_tests/transitive_pinned_dependency1/node_modules/c/tests/test.res index fd01e9ef06..aa7a48d65d 100644 --- a/tests/build_tests/transitive_pinned_dependency1/node_modules/c/tests/test.res +++ b/tests/build_tests/transitive_pinned_dependency1/node_modules/c/tests/test.res @@ -1 +1 @@ -Js.Console.log("test") \ No newline at end of file +Js.Console.log("test") diff --git a/tests/build_tests/transitive_pinned_dependency2/a/src/src.res b/tests/build_tests/transitive_pinned_dependency2/a/src/src.res index 487a974bff..95733e46af 100644 --- a/tests/build_tests/transitive_pinned_dependency2/a/src/src.res +++ b/tests/build_tests/transitive_pinned_dependency2/a/src/src.res @@ -1 +1 @@ -Js.Console.log("src") \ No newline at end of file +Js.Console.log("src") diff --git a/tests/build_tests/transitive_pinned_dependency2/a/tests/test.res b/tests/build_tests/transitive_pinned_dependency2/a/tests/test.res index fd01e9ef06..aa7a48d65d 100644 --- a/tests/build_tests/transitive_pinned_dependency2/a/tests/test.res +++ b/tests/build_tests/transitive_pinned_dependency2/a/tests/test.res @@ -1 +1 @@ -Js.Console.log("test") \ No newline at end of file +Js.Console.log("test") diff --git a/tests/build_tests/transitive_pinned_dependency2/node_modules/b/src/src.res b/tests/build_tests/transitive_pinned_dependency2/node_modules/b/src/src.res index 487a974bff..95733e46af 100644 --- a/tests/build_tests/transitive_pinned_dependency2/node_modules/b/src/src.res +++ b/tests/build_tests/transitive_pinned_dependency2/node_modules/b/src/src.res @@ -1 +1 @@ -Js.Console.log("src") \ No newline at end of file +Js.Console.log("src") diff --git a/tests/build_tests/transitive_pinned_dependency2/node_modules/b/tests/test.res b/tests/build_tests/transitive_pinned_dependency2/node_modules/b/tests/test.res index fd01e9ef06..aa7a48d65d 100644 --- a/tests/build_tests/transitive_pinned_dependency2/node_modules/b/tests/test.res +++ b/tests/build_tests/transitive_pinned_dependency2/node_modules/b/tests/test.res @@ -1 +1 @@ -Js.Console.log("test") \ No newline at end of file +Js.Console.log("test") diff --git a/tests/build_tests/transitive_pinned_dependency2/node_modules/c/src/src.res b/tests/build_tests/transitive_pinned_dependency2/node_modules/c/src/src.res index 487a974bff..95733e46af 100644 --- a/tests/build_tests/transitive_pinned_dependency2/node_modules/c/src/src.res +++ b/tests/build_tests/transitive_pinned_dependency2/node_modules/c/src/src.res @@ -1 +1 @@ -Js.Console.log("src") \ No newline at end of file +Js.Console.log("src") diff --git a/tests/build_tests/transitive_pinned_dependency2/node_modules/c/tests/test.res b/tests/build_tests/transitive_pinned_dependency2/node_modules/c/tests/test.res index fd01e9ef06..aa7a48d65d 100644 --- a/tests/build_tests/transitive_pinned_dependency2/node_modules/c/tests/test.res +++ b/tests/build_tests/transitive_pinned_dependency2/node_modules/c/tests/test.res @@ -1 +1 @@ -Js.Console.log("test") \ No newline at end of file +Js.Console.log("test") diff --git a/tests/build_tests/uncurried-always/src/UncurriedAlways.res b/tests/build_tests/uncurried-always/src/UncurriedAlways.res index b6555b4a5e..01f9d2ee16 100644 --- a/tests/build_tests/uncurried-always/src/UncurriedAlways.res +++ b/tests/build_tests/uncurried-always/src/UncurriedAlways.res @@ -1,15 +1,15 @@ let foo = (x, y) => x + y -let z = foo(. 3, 4) +let z = foo(3, 4) -let bar = (. x, y) => x + y +let bar = (x, y) => x + y let b = bar(3, 4) let w = 3->foo(4) -let a = 3->foo(. 4) +let a = 3->foo(4) Js.log(a) // Test automatic uncurried application -let _ = Js.Array2.map([1], (. x) => x+1) +let _ = Js.Array2.map([1], x => x + 1) diff --git a/tests/build_tests/weird_names/src/404.res b/tests/build_tests/weird_names/src/404.res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/404.res +++ b/tests/build_tests/weird_names/src/404.res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names/src/[...params].res b/tests/build_tests/weird_names/src/[...params].res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/[...params].res +++ b/tests/build_tests/weird_names/src/[...params].res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names/src/[...params_max_3].res b/tests/build_tests/weird_names/src/[...params_max_3].res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/[...params_max_3].res +++ b/tests/build_tests/weird_names/src/[...params_max_3].res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names/src/[[...params]].res b/tests/build_tests/weird_names/src/[[...params]].res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/[[...params]].res +++ b/tests/build_tests/weird_names/src/[[...params]].res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names/src/[slug_or_ID].res b/tests/build_tests/weird_names/src/[slug_or_ID].res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/[slug_or_ID].res +++ b/tests/build_tests/weird_names/src/[slug_or_ID].res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names/src/_app.res b/tests/build_tests/weird_names/src/_app.res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/_app.res +++ b/tests/build_tests/weird_names/src/_app.res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names/src/utils.test.res b/tests/build_tests/weird_names/src/utils.test.res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names/src/utils.test.res +++ b/tests/build_tests/weird_names/src/utils.test.res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/weird_names_not_found_bug/src/demo.test.res b/tests/build_tests/weird_names_not_found_bug/src/demo.test.res index c311b2ea80..74f7349d41 100644 --- a/tests/build_tests/weird_names_not_found_bug/src/demo.test.res +++ b/tests/build_tests/weird_names_not_found_bug/src/demo.test.res @@ -1,2 +1,2 @@ module A = Demo -let a = 1 \ No newline at end of file +let a = 1 diff --git a/tests/build_tests/zerocycle/src/bar.res b/tests/build_tests/zerocycle/src/bar.res index 1a8c37cbf2..f35b82df05 100644 --- a/tests/build_tests/zerocycle/src/bar.res +++ b/tests/build_tests/zerocycle/src/bar.res @@ -10,5 +10,5 @@ open Nested module Bar = { open Bar - let t : t = Obj.magic(42) -} \ No newline at end of file + let t: t = Obj.magic(42) +} diff --git a/tests/build_tests/zerocycle/src/demo2.res b/tests/build_tests/zerocycle/src/demo2.res index dc74456013..2974fd44e0 100644 --- a/tests/build_tests/zerocycle/src/demo2.res +++ b/tests/build_tests/zerocycle/src/demo2.res @@ -1 +1 @@ -module Foo2 = {} \ No newline at end of file +module Foo2 = {} diff --git a/tests/build_tests/zerocycle/src/foo2.res b/tests/build_tests/zerocycle/src/foo2.res index 24c75a3530..3a4173d18d 100644 --- a/tests/build_tests/zerocycle/src/foo2.res +++ b/tests/build_tests/zerocycle/src/foo2.res @@ -1,2 +1,2 @@ open Demo2 -include Foo2 \ No newline at end of file +include Foo2 diff --git a/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res b/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res index 053bca66b0..5ff1b5be15 100644 --- a/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res +++ b/tests/gentype_tests/typescript-react-example/src/BucklescriptAnnotations.res @@ -14,15 +14,15 @@ type someMethods = { @meth "send": string => unit, @meth - "on": (string, (. int) => unit) => unit, + "on": (string, int => unit) => unit, @meth "threeargs": (int, string, int) => string, - "twoArgs": (. int, string) => int, + "twoArgs": (int, string) => int, } // let foo = (x: someMethods) => x["threeargs"](3, "a", 4) let bar = (x: someMethods) => { let f = x["twoArgs"] - f(. 3, "a") + f(3, "a") } diff --git a/tests/gentype_tests/typescript-react-example/src/Date.res b/tests/gentype_tests/typescript-react-example/src/Date.res index 87cfe1b554..9cee890bbc 100644 --- a/tests/gentype_tests/typescript-react-example/src/Date.res +++ b/tests/gentype_tests/typescript-react-example/src/Date.res @@ -1 +1 @@ -type t = Js.Date.t \ No newline at end of file +type t = Js.Date.t diff --git a/tests/gentype_tests/typescript-react-example/src/Docstrings.res b/tests/gentype_tests/typescript-react-example/src/Docstrings.res index 4a5abaeccf..28e54316bd 100644 --- a/tests/gentype_tests/typescript-react-example/src/Docstrings.res +++ b/tests/gentype_tests/typescript-react-example/src/Docstrings.res @@ -10,7 +10,7 @@ let flat = 34 * @returns A signed message */ @genType -let signMessage = (. message, key) => message ++ Belt.Int.toString(key) +let signMessage = (message, key) => message ++ Belt.Int.toString(key) @genType let one = a => a + 0 @@ -18,29 +18,29 @@ let signMessage = (. message, key) => message ++ Belt.Int.toString(key) @genType let tree = (a, b, c) => a + b + c + 0 -@genType let oneU = (. a) => a + 0 +@genType let oneU = a => a + 0 -@genType let twoU = (. a, b) => a + b + 0 +@genType let twoU = (a, b) => a + b + 0 -@genType let treeU = (. a, b, c) => a + b + c + 0 +@genType let treeU = (a, b, c) => a + b + c + 0 @genType let useParam = param => param + 34 -@genType let useParamU = (. param) => param + 34 +@genType let useParamU = param => param + 34 @genType let unnamed1 = (_: int) => 34 -@genType let unnamed1U = (. _: int) => 34 +@genType let unnamed1U = (_: int) => 34 @genType let unnamed2 = (_: int, _: int) => 34 -@genType let unnamed2U = (. _: int, _: int) => 34 +@genType let unnamed2U = (_: int, _: int) => 34 @genType let grouped = (~x, ~y, a, b, c, ~z) => x + y + a + b + c + z @genType let unitArgWithoutConversion = () => "abc" -@genType let unitArgWithoutConversionU = (. ()) => "abc" +@genType let unitArgWithoutConversionU = () => "abc" type t = | A @@ -48,4 +48,4 @@ type t = @genType let unitArgWithConversion = () => A -@genType let unitArgWithConversionU = (. ()) => A +@genType let unitArgWithConversionU = () => A diff --git a/tests/gentype_tests/typescript-react-example/src/FirstClassModules.res b/tests/gentype_tests/typescript-react-example/src/FirstClassModules.res index 86ef6af2c4..9f8b983435 100644 --- a/tests/gentype_tests/typescript-react-example/src/FirstClassModules.res +++ b/tests/gentype_tests/typescript-react-example/src/FirstClassModules.res @@ -26,9 +26,7 @@ module M = { module type XXX = { type tt = string } - module EmptyInnerModule = { - - } + module EmptyInnerModule = {} module InnerModule2 = { let k = 4242 } diff --git a/tests/gentype_tests/typescript-react-example/src/Hooks.res b/tests/gentype_tests/typescript-react-example/src/Hooks.res index 862c593abb..5468269e3a 100644 --- a/tests/gentype_tests/typescript-react-example/src/Hooks.res +++ b/tests/gentype_tests/typescript-react-example/src/Hooks.res @@ -9,7 +9,9 @@ let make = (~vehicle) => {

{React.string( - "Hooks example " ++ (vehicle.name ++ (" clicked " ++ (Belt.Int.toString(count) ++ " times"))), + "Hooks example " ++ + (vehicle.name ++ + (" clicked " ++ (Belt.Int.toString(count) ++ " times"))), )}

@@ -88,15 +90,13 @@ module WithRef = { } } -@genType let testForwardRef = React.forwardRef( (x,y) => WithRef.makeWithRef(x)(y)) +@genType let testForwardRef = React.forwardRef((x, y) => WithRef.makeWithRef(x)(y)) type r = {x: string} module ForwardRef = { @genType - let input = React.forwardRef((r, ref) => -
{React.string(r.x)}
- ) + let input = React.forwardRef((r, ref) =>
{React.string(r.x)}
) } @genType type callback<'input, 'output> = 'input => 'output diff --git a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res index 21072a9ba1..328e9f0cd1 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res +++ b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.res @@ -52,7 +52,7 @@ module Array = { let zip = (a1, a2) => Array.zip(fromT(a1), fromT(a2))->toTp let zipByU = (a1, a2, f) => Array.zipByU(fromT(a1), fromT(a2), f)->toT - let zipBy = (a1, a2, f) => Array.zipBy(fromT(a1), fromT(a2), (x,y) => f(x, y))->toT + let zipBy = (a1, a2, f) => Array.zipBy(fromT(a1), fromT(a2), (x, y) => f(x, y))->toT let unzip = a => Array.unzip(a->fromTp)->toT2 @@ -73,28 +73,29 @@ module Array = { let map = (a, f) => Array.map(a->fromT, x => f(x))->toT let keepWithIndexU = (a, f) => Array.keepWithIndexU(a->fromT, f)->toT - let keepWithIndex = (a, f) => Array.keepWithIndex(a->fromT, (x,y) =>f(x,y))->toT + let keepWithIndex = (a, f) => Array.keepWithIndex(a->fromT, (x, y) => f(x, y))->toT let keepMapU = (a, f) => Array.keepMapU(a->fromT, f)->toT let keepMap = (a, f) => Array.keepMap(a->fromT, x => f(x))->toT let forEachWithIndexU = (a, f) => Array.forEachWithIndexU(a->fromT, f) - let forEachWithIndex = (a, f) => Array.forEachWithIndex(a->fromT, (x,y) => f(x,y)) + let forEachWithIndex = (a, f) => Array.forEachWithIndex(a->fromT, (x, y) => f(x, y)) let mapWithIndexU = (a, f) => Array.mapWithIndexU(a->fromT, f)->toT - let mapWithIndex = (a, f) => Array.mapWithIndex(a->fromT, (x,y) => f(x,y))->toT + let mapWithIndex = (a, f) => Array.mapWithIndex(a->fromT, (x, y) => f(x, y))->toT let partitionU = (a, f) => Array.partitionU(a->fromT, f)->toT2 let partition = (a, f) => Array.partition(a->fromT, x => f(x))->toT2 let reduceU = (a, b, f) => Array.reduceU(a->fromT, b, f) - let reduce = (a, b, f) => Array.reduce(a->fromT, b, (x,y) => f(x,y)) + let reduce = (a, b, f) => Array.reduce(a->fromT, b, (x, y) => f(x, y)) let reduceReverseU = (a, b, f) => Array.reduceReverseU(a->fromT, b, f) - let reduceReverse = (a, b, f) => Array.reduceReverse(a->fromT, b, (x,y) => f(x,y)) + let reduceReverse = (a, b, f) => Array.reduceReverse(a->fromT, b, (x, y) => f(x, y)) let reduceReverse2U = (a1, a2, c, f) => Array.reduceReverse2U(fromT(a1), fromT(a2), c, f) - let reduceReverse2 = (a1, a2, c, f) => Array.reduceReverse2(fromT(a1), fromT(a2), c, (x,y,z) => f(x,y,z)) + let reduceReverse2 = (a1, a2, c, f) => + Array.reduceReverse2(fromT(a1), fromT(a2), c, (x, y, z) => f(x, y, z)) let someU = (a, f) => Array.someU(a->fromT, f) let some = (a, f) => Array.some(a->fromT, x => f(x)) @@ -103,16 +104,16 @@ module Array = { let every = (a, f) => Array.every(a->fromT, x => f(x)) let every2U = (a1, a2, f) => Array.every2U(fromT(a1), fromT(a2), f) - let every2 = (a1, a2, f) => Array.every2(fromT(a1), fromT(a2), (x,y) => f(x,y)) + let every2 = (a1, a2, f) => Array.every2(fromT(a1), fromT(a2), (x, y) => f(x, y)) let some2U = (a1, a2, f) => Array.some2U(fromT(a1), fromT(a2), f) - let some2 = (a1, a2, f) => Array.some2(fromT(a1), fromT(a2), (x,y) => f(x,y)) + let some2 = (a1, a2, f) => Array.some2(fromT(a1), fromT(a2), (x, y) => f(x, y)) let cmpU = (a1, a2, f) => Array.cmpU(fromT(a1), fromT(a2), f) - let cmp = (a1, a2, f) => Array.cmp(fromT(a1), fromT(a2), (x,y) => f(x,y)) + let cmp = (a1, a2, f) => Array.cmp(fromT(a1), fromT(a2), (x, y) => f(x, y)) let eqU = (a1, a2, f) => Array.eqU(fromT(a1), fromT(a2), f) - let eq = (a1, a2, f) => Array.eq(fromT(a1), fromT(a2), (x,y) => f(x,y)) + let eq = (a1, a2, f) => Array.eq(fromT(a1), fromT(a2), (x, y) => f(x, y)) } include Array diff --git a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi index 89d599a947..133a8c97be 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi +++ b/tests/gentype_tests/typescript-react-example/src/ImmutableArray.resi @@ -38,15 +38,15 @@ let range: (int, int) => t let rangeBy: (int, int, ~step: int) => t -let makeByU: (int, (. int) => 'a) => t<'a> +let makeByU: (int, int => 'a) => t<'a> let makeBy: (int, int => 'a) => t<'a> -let makeByAndShuffleU: (int, (. int) => 'a) => t<'a> +let makeByAndShuffleU: (int, int => 'a) => t<'a> let makeByAndShuffle: (int, int => 'a) => t<'a> let zip: (t<'a>, t<'b>) => t<('a, 'b)> -let zipByU: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c> +let zipByU: (t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c> let zipBy: (t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c> let unzip: t<('a, 'a)> => (t<'a>, t<'a>) @@ -61,50 +61,50 @@ let sliceToEnd: (t<'a>, int) => t<'a> let copy: t<'a> => t<'a> -let forEachU: (t<'a>, (. 'a) => unit) => unit +let forEachU: (t<'a>, 'a => unit) => unit let forEach: (t<'a>, 'a => unit) => unit -let mapU: (t<'a>, (. 'a) => 'b) => t<'b> +let mapU: (t<'a>, 'a => 'b) => t<'b> let map: (t<'a>, 'a => 'b) => t<'b> -let keepWithIndexU: (t<'a>, (. 'a, int) => bool) => t<'a> +let keepWithIndexU: (t<'a>, ('a, int) => bool) => t<'a> let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a> -let keepMapU: (t<'a>, (. 'a) => option<'b>) => t<'b> +let keepMapU: (t<'a>, 'a => option<'b>) => t<'b> let keepMap: (t<'a>, 'a => option<'b>) => t<'b> -let forEachWithIndexU: (t<'a>, (. int, 'a) => unit) => unit +let forEachWithIndexU: (t<'a>, (int, 'a) => unit) => unit let forEachWithIndex: (t<'a>, (int, 'a) => unit) => unit -let mapWithIndexU: (t<'a>, (. int, 'a) => 'b) => t<'b> +let mapWithIndexU: (t<'a>, (int, 'a) => 'b) => t<'b> let mapWithIndex: (t<'a>, (int, 'a) => 'b) => t<'b> -let partitionU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>) +let partitionU: (t<'a>, 'a => bool) => (t<'a>, t<'a>) let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>) -let reduceU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b +let reduceU: (t<'a>, 'b, ('b, 'a) => 'b) => 'b let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b -let reduceReverseU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b +let reduceReverseU: (t<'a>, 'b, ('b, 'a) => 'b) => 'b let reduceReverse: (t<'a>, 'b, ('b, 'a) => 'b) => 'b -let reduceReverse2U: (t<'a>, t<'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c +let reduceReverse2U: (t<'a>, t<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c let reduceReverse2: (t<'a>, t<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c -let someU: (t<'a>, (. 'a) => bool) => bool +let someU: (t<'a>, 'a => bool) => bool let some: (t<'a>, 'a => bool) => bool -let everyU: (t<'a>, (. 'a) => bool) => bool +let everyU: (t<'a>, 'a => bool) => bool let every: (t<'a>, 'a => bool) => bool -let every2U: (t<'a>, t<'b>, (. 'a, 'b) => bool) => bool +let every2U: (t<'a>, t<'b>, ('a, 'b) => bool) => bool let every2: (t<'a>, t<'b>, ('a, 'b) => bool) => bool -let some2U: (t<'a>, t<'b>, (. 'a, 'b) => bool) => bool +let some2U: (t<'a>, t<'b>, ('a, 'b) => bool) => bool let some2: (t<'a>, t<'b>, ('a, 'b) => bool) => bool -let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int +let cmpU: (t<'a>, t<'a>, ('a, 'a) => int) => int let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int -let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool +let eqU: (t<'a>, t<'a>, ('a, 'a) => bool) => bool let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool diff --git a/tests/gentype_tests/typescript-react-example/src/ImportHookDefault.res b/tests/gentype_tests/typescript-react-example/src/ImportHookDefault.res index 2a345d89a3..dfcae76b60 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImportHookDefault.res +++ b/tests/gentype_tests/typescript-react-example/src/ImportHookDefault.res @@ -11,11 +11,10 @@ external make: ( ) => React.element = "make" module MM = { -@genType.import("./hookExample") @react.component -external make2: ( - ~person: person, - ~children: React.element, - ~renderMe: ImportHooks.renderMe, -) => React.element = "default" + @genType.import("./hookExample") @react.component + external make2: ( + ~person: person, + ~children: React.element, + ~renderMe: ImportHooks.renderMe, + ) => React.element = "default" } - diff --git a/tests/gentype_tests/typescript-react-example/src/ImportJsValue.res b/tests/gentype_tests/typescript-react-example/src/ImportJsValue.res index 91dd17680c..29a82bc5bc 100644 --- a/tests/gentype_tests/typescript-react-example/src/ImportJsValue.res +++ b/tests/gentype_tests/typescript-react-example/src/ImportJsValue.res @@ -34,7 +34,7 @@ external returnMixedArray: unit => array = "returnMixedArray" module AbsoluteValue = { @genType.import(("./MyMath", "AbsoluteValue")) - type t = {"getAbs": (. unit) => int} + type t = {"getAbs": unit => int} /* This is untyped */ @send external getProp: t => int = "getProp" @@ -42,7 +42,7 @@ module AbsoluteValue = { /* This is also untyped, as we "trust" the type declaration in absoluteVaue */ let getAbs = (x: t) => { let getAbs = x["getAbs"] - getAbs(.) + getAbs() } } diff --git a/tests/gentype_tests/typescript-react-example/src/InnerModuleSignature.res b/tests/gentype_tests/typescript-react-example/src/InnerModuleSignature.res index fd77fe8a45..391531868d 100644 --- a/tests/gentype_tests/typescript-react-example/src/InnerModuleSignature.res +++ b/tests/gentype_tests/typescript-react-example/src/InnerModuleSignature.res @@ -6,4 +6,3 @@ module InnerModule: { type t = string let make = t => t ++ "..." } - diff --git a/tests/gentype_tests/typescript-react-example/src/Lib.res b/tests/gentype_tests/typescript-react-example/src/Lib.res index 9676ebecc7..e7c62cc6c9 100644 --- a/tests/gentype_tests/typescript-react-example/src/Lib.res +++ b/tests/gentype_tests/typescript-react-example/src/Lib.res @@ -1,6 +1,5 @@ -@gentype -@tag("action") -type action = | A(string) | B(string) +@gentype @tag("action") +type action = A(string) | B(string) let a = A("a") let b = B("b") diff --git a/tests/gentype_tests/typescript-react-example/src/MoreVariants.res b/tests/gentype_tests/typescript-react-example/src/MoreVariants.res index 1862b7a9a2..826546a88d 100644 --- a/tests/gentype_tests/typescript-react-example/src/MoreVariants.res +++ b/tests/gentype_tests/typescript-react-example/src/MoreVariants.res @@ -9,4 +9,3 @@ type withoutRenaming = [#type_ | #b] @genType let testWithoutRenaming = (x: withoutRenaming) => x - diff --git a/tests/gentype_tests/typescript-react-example/src/NestedVariants.res b/tests/gentype_tests/typescript-react-example/src/NestedVariants.res index cb32d311fc..f91b15d370 100644 --- a/tests/gentype_tests/typescript-react-example/src/NestedVariants.res +++ b/tests/gentype_tests/typescript-react-example/src/NestedVariants.res @@ -77,4 +77,3 @@ let testInline = x => | K(a, b) => K(b, a) | L(q) => L(q) } - diff --git a/tests/gentype_tests/typescript-react-example/src/Unboxed.res b/tests/gentype_tests/typescript-react-example/src/Unboxed.res index ee98bc17c5..3bb3cf7781 100644 --- a/tests/gentype_tests/typescript-react-example/src/Unboxed.res +++ b/tests/gentype_tests/typescript-react-example/src/Unboxed.res @@ -15,7 +15,7 @@ type r2 = B({g: string}) @genType let r2Test = (x: r2) => x @genType @unboxed -type t = Array(array) | Record({x: int}) | Function((. int) => int) +type t = Array(array) | Record({x: int}) | Function(int => int) @genType type tabIndex = | @as("0") Activity | @as("1") UserKeyword | @as(0) NumZero diff --git a/tests/gentype_tests/typescript-react-example/src/Uncurried.res b/tests/gentype_tests/typescript-react-example/src/Uncurried.res index ac78dcff15..8de34f67d9 100644 --- a/tests/gentype_tests/typescript-react-example/src/Uncurried.res +++ b/tests/gentype_tests/typescript-react-example/src/Uncurried.res @@ -1,33 +1,33 @@ -@genType type u0 = (. unit) => string +@genType type u0 = unit => string -@genType type u1 = (. int) => string +@genType type u1 = int => string -@genType type u2 = (. int, string) => string +@genType type u2 = (int, string) => string -@genType type u3 = (. int, string, int) => string +@genType type u3 = (int, string, int) => string -@genType let uncurried0 = (. ()) => "" +@genType let uncurried0 = () => "" -@genType let uncurried1 = (. x) => x->Belt.Int.toString +@genType let uncurried1 = x => x->Belt.Int.toString -@genType let uncurried2 = (. x, y) => (x->Belt.Int.toString) ++ y +@genType let uncurried2 = (x, y) => x->Belt.Int.toString ++ y -@genType let uncurried3 = (. x, y, z) => (x->Belt.Int.toString) ++ (y ++ (z->Belt.Int.toString)) +@genType let uncurried3 = (x, y, z) => x->Belt.Int.toString ++ (y ++ z->Belt.Int.toString) -@genType let curried3 = (x, y, z) => (x->Belt.Int.toString) ++ (y ++ (z->Belt.Int.toString)) +@genType let curried3 = (x, y, z) => x->Belt.Int.toString ++ (y ++ z->Belt.Int.toString) @genType let callback = cb => cb()->Belt.Int.toString type auth = {login: unit => string} -type authU = {loginU: (. unit) => string} +type authU = {loginU: unit => string} @genType let callback2 = auth => auth.login() -@genType let callback2U = auth => auth.loginU(.) +@genType let callback2U = auth => auth.loginU() -@genType let sumU = (. n, m) => Js.log4("sumU 2nd arg", m, "result", n + m) +@genType let sumU = (n, m) => Js.log4("sumU 2nd arg", m, "result", n + m) -@genType let sumU2 = (. n) => (. m) => Js.log4("sumU2 2nd arg", m, "result", n + m) +@genType let sumU2 = n => m => Js.log4("sumU2 2nd arg", m, "result", n + m) @genType let sumCurried = n => { diff --git a/tests/gentype_tests/typescript-react-example/src/Variants.res b/tests/gentype_tests/typescript-react-example/src/Variants.res index 4dcde43f9f..9b1fb0e672 100644 --- a/tests/gentype_tests/typescript-react-example/src/Variants.res +++ b/tests/gentype_tests/typescript-react-example/src/Variants.res @@ -46,7 +46,7 @@ type testGenTypeAs = [ @genType type testGenTypeAs2 = [ | #type_ - | #\"module" + | #"module" | #42 ] @@ -56,8 +56,8 @@ type testGenTypeAs2 = [ @genType type testGenTypeAs3 = [ - | #type_ - | #\"module" + | #type_ + | #"module" | #42 ] diff --git a/tests/gentype_tests/typescript-react-example/src/VariantsWithPayload.res b/tests/gentype_tests/typescript-react-example/src/VariantsWithPayload.res index 13831c803c..1ccc9d1b6c 100644 --- a/tests/gentype_tests/typescript-react-example/src/VariantsWithPayload.res +++ b/tests/gentype_tests/typescript-react-example/src/VariantsWithPayload.res @@ -52,7 +52,7 @@ type simpleVariant = @genType type variantWithPayloads = - | A + | A | B(int) | C(int, int) | D((int, int))