diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index dd7d9b9e20..bfda1de7f4 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fantomas": {
- "version": "7.0.6",
+ "version": "8.0.0",
"commands": [
"fantomas"
],
@@ -17,7 +17,7 @@
"rollForward": false
},
"fsharp-analyzers": {
- "version": "0.38.0",
+ "version": "0.39.2",
"commands": [
"fsharp-analyzers"
],
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index d9eff242ce..d5525ec703 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -28,11 +28,11 @@
all
build
-
+
all
analyzers
-
+
all
analyzers
diff --git a/src/Fable.Analyzers/Fable.Analyzers.fsproj b/src/Fable.Analyzers/Fable.Analyzers.fsproj
index 81249e8a5a..26837db080 100644
--- a/src/Fable.Analyzers/Fable.Analyzers.fsproj
+++ b/src/Fable.Analyzers/Fable.Analyzers.fsproj
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Fable.Compiler/BrowserInlineExprs.fs b/src/Fable.Compiler/BrowserInlineExprs.fs
index e8aaeb4c2f..ab4c98a449 100644
--- a/src/Fable.Compiler/BrowserInlineExprs.fs
+++ b/src/Fable.Compiler/BrowserInlineExprs.fs
@@ -25,13 +25,13 @@ let private extra =
(Decode.uint64 |> Decode.map unativeint)
let private decoder =
- lazy (Decode.Auto.generateDecoder<(string * Fable.InlineExpr) array> (extra = extra))
+ lazy (Decode.Auto.generateDecoder<(string * Fable.InlineExpr) array>(extra = extra))
let fromString (json: string) : Result<(string * Fable.InlineExpr) array, string> = Decode.fromString decoder.Value json
#if !FABLE_COMPILER
let private encoder =
- lazy (Encode.Auto.generateEncoder<(string * Fable.InlineExpr) array> (extra = extra))
+ lazy (Encode.Auto.generateEncoder<(string * Fable.InlineExpr) array>(extra = extra))
let toString (chunk: (string * Fable.InlineExpr) array) : string =
chunk |> encoder.Value |> Encode.toString 0
diff --git a/src/Fable.Transforms/Babel/Fable2Babel.fs b/src/Fable.Transforms/Babel/Fable2Babel.fs
index 6dc75f53db..1b62340a4f 100644
--- a/src/Fable.Transforms/Babel/Fable2Babel.fs
+++ b/src/Fable.Transforms/Babel/Fable2Babel.fs
@@ -866,7 +866,7 @@ module Annotation =
let makeStringEnumTypeAnnotation (ent: Fable.Entity) (attArgs: obj list) =
let rule =
match List.tryHead attArgs with
- | Some(:? int as rule) -> enum (rule)
+ | Some(:? int as rule) -> enum(rule)
| _ -> Core.CaseRules.LowerFirst
ent.UnionCases
@@ -896,7 +896,7 @@ module Annotation =
let makeTypeScriptTaggedUnionTypeAnnotation com ctx genArgs (ent: Fable.Entity) (attArgs: obj list) =
let tag, rule =
match attArgs with
- | (:? string as tag) :: (:? int as rule) :: _ -> tag, enum (rule)
+ | (:? string as tag) :: (:? int as rule) :: _ -> tag, enum(rule)
| (:? string as tag) :: _ -> tag, Core.CaseRules.LowerFirst
| _ -> "kind", Core.CaseRules.LowerFirst
@@ -2213,6 +2213,7 @@ but thanks to the optimisation done below we get
| _ -> ValueNone
// Make it easy to check if we are calling the expected function
+
and [] (|CalledExpression|_|) (callerText: string) value =
match value with
| CallExpression(IdentifierIs callerText, UnrollerFromArray exprs, _, _) -> ValueSome exprs
diff --git a/src/Fable.Transforms/Beam/Fable2Beam.Util.fs b/src/Fable.Transforms/Beam/Fable2Beam.Util.fs
index 727237303d..501518a8e4 100644
--- a/src/Fable.Transforms/Beam/Fable2Beam.Util.fs
+++ b/src/Fable.Transforms/Beam/Fable2Beam.Util.fs
@@ -63,7 +63,7 @@ let private wrappedLiteral (bits: int, signed: bool) (value: int64) =
if not signed && truncated < 0L then
// 64-bit unsigned above Int64.MaxValue: does not fit an Erlang int64 literal
- Beam.ErlExpr.Literal(Beam.ErlLiteral.BigInt(string (uint64 truncated)))
+ Beam.ErlExpr.Literal(Beam.ErlLiteral.BigInt(string(uint64 truncated)))
else
Beam.ErlExpr.Literal(Beam.ErlLiteral.Integer truncated)
diff --git a/src/Fable.Transforms/Dart/Replacements.fs b/src/Fable.Transforms/Dart/Replacements.fs
index f9f0a6dcaa..a36c3a457a 100644
--- a/src/Fable.Transforms/Dart/Replacements.fs
+++ b/src/Fable.Transforms/Dart/Replacements.fs
@@ -1630,7 +1630,7 @@ let formattableString
|}
)
- printJsTaggedTemplate str holes (fun i -> "$" + string (i + offset))
+ printJsTaggedTemplate str holes (fun i -> "$" + string(i + offset))
emitExpr r t args (callMacro + jsTaggedTemplate) |> Some
| "get_Format", Some x, _ -> Helper.LibCall(com, "String", "getFormat", t, [ x ], ?loc = r) |> Some
diff --git a/src/Fable.Transforms/FSharp2Fable.Util.fs b/src/Fable.Transforms/FSharp2Fable.Util.fs
index d9d9dd3317..61eb69055e 100644
--- a/src/Fable.Transforms/FSharp2Fable.Util.fs
+++ b/src/Fable.Transforms/FSharp2Fable.Util.fs
@@ -1075,7 +1075,7 @@ module Helpers =
let getCaseRule (att: FSharpAttribute) =
match Seq.tryHead att.ConstructorArguments with
- | Some(_, (:? int as rule)) -> enum (rule)
+ | Some(_, (:? int as rule)) -> enum(rule)
| _ -> CaseRules.LowerFirst
unionCase.Attributes
@@ -1103,7 +1103,7 @@ module Helpers =
| Some(_, (:? string as name)), None ->
Some(TypeScriptTaggedUnion(tdef, typ.GenericArguments, name, CaseRules.LowerFirst))
| Some(_, (:? string as name)), Some(_, (:? int as rule)) ->
- Some(TypeScriptTaggedUnion(tdef, typ.GenericArguments, name, enum (rule)))
+ Some(TypeScriptTaggedUnion(tdef, typ.GenericArguments, name, enum(rule)))
| _ -> failwith "Invalid TypeScriptTaggedUnion attribute"
| _ -> None
)
diff --git a/src/Fable.Transforms/Python/Fable2Python.Transforms.fs b/src/Fable.Transforms/Python/Fable2Python.Transforms.fs
index 1c71ea9c0a..5bde8afa1f 100644
--- a/src/Fable.Transforms/Python/Fable2Python.Transforms.fs
+++ b/src/Fable.Transforms/Python/Fable2Python.Transforms.fs
@@ -1706,7 +1706,10 @@ let transformGet (com: IPythonCompiler) ctx range typ (fableExpr: Fable.Expr) ki
let caseRef = getUnionCaseRef com ctx i.Entity ent uci
let narrow = libValue com ctx "union" "narrow"
let narrowedExpr = Expression.call (narrow, [ caseRef; baseExpr ])
- let! finalExpr = getExpr com ctx range narrowedExpr (Expression.stringConstant fieldName)
+
+ let! finalExpr =
+ getExpr com ctx range narrowedExpr (Expression.stringConstant fieldName)
+
return finalExpr
}
diff --git a/src/Fable.Transforms/Rust/AST/Rust.AST.Helpers.fs b/src/Fable.Transforms/Rust/AST/Rust.AST.Helpers.fs
index 7b6a4d5f56..f2eecc6918 100644
--- a/src/Fable.Transforms/Rust/AST/Rust.AST.Helpers.fs
+++ b/src/Fable.Transforms/Rust/AST/Rust.AST.Helpers.fs
@@ -202,7 +202,7 @@ module Literals =
let mkCharLit (value: char) : Lit =
{
- token = mkCharTokenLit ((string value).escape_debug ())
+ token = mkCharTokenLit ((string value).escape_debug())
kind = LitKind.Char(value)
span = DUMMY_SP
}
@@ -890,7 +890,7 @@ module Exprs =
value.StartsWith("\"", System.StringComparison.Ordinal)
&& value.EndsWith("\"", System.StringComparison.Ordinal)
then
- "\"" + value[1 .. (value.Length - 2)].escape_debug () + "\""
+ "\"" + value[1 .. (value.Length - 2)].escape_debug() + "\""
else
value
diff --git a/src/Fable.Transforms/Rust/AST/Rust.AST.Impl.fs b/src/Fable.Transforms/Rust/AST/Rust.AST.Impl.fs
index 312811ee86..c0222bd999 100644
--- a/src/Fable.Transforms/Rust/AST/Rust.AST.Impl.fs
+++ b/src/Fable.Transforms/Rust/AST/Rust.AST.Impl.fs
@@ -374,7 +374,7 @@ type Expr with
type MacCall with
member self.span() : Span =
- self.path.span.to_ (self.args.span().unwrap_or (self.path.span))
+ self.path.span.to_ (self.args.span().unwrap_or(self.path.span))
type MacArgs with
diff --git a/src/Fable.Transforms/Rust/AST/Rust.AST.Parser.fs b/src/Fable.Transforms/Rust/AST/Rust.AST.Parser.fs
index 293a73d302..8b48ed95d2 100644
--- a/src/Fable.Transforms/Rust/AST/Rust.AST.Parser.fs
+++ b/src/Fable.Transforms/Rust/AST/Rust.AST.Parser.fs
@@ -368,7 +368,7 @@ type ExprPrecedence with
| ExprPrecedence.Range -> PREC_RANGE
// Binop-like expr kinds, handled by `AssocOp`.
- | ExprPrecedence.Binary(op) -> AssocOp.from_ast_binop(op).precedence ()
+ | ExprPrecedence.Binary(op) -> AssocOp.from_ast_binop(op).precedence()
| ExprPrecedence.Cast -> AssocOp.As.precedence ()
| ExprPrecedence.Type -> AssocOp.Colon.precedence ()
diff --git a/src/Fable.Transforms/Rust/AST/Rust.AST.Pretty.fs b/src/Fable.Transforms/Rust/AST/Rust.AST.Pretty.fs
index a07e989131..a63a99f7b6 100644
--- a/src/Fable.Transforms/Rust/AST/Rust.AST.Pretty.fs
+++ b/src/Fable.Transforms/Rust/AST/Rust.AST.Pretty.fs
@@ -421,11 +421,11 @@ type Printer with
self.buf[self.right] <- entry
self.scan_stack.push_front (self.right)
- member self.scan_pop() : usize = self.scan_stack.pop_front().unwrap ()
+ member self.scan_pop() : usize = self.scan_stack.pop_front().unwrap()
- member self.scan_top() : usize = self.scan_stack.front().unwrap ()
+ member self.scan_top() : usize = self.scan_stack.front().unwrap()
- member self.scan_pop_bottom() : usize = self.scan_stack.pop_back().unwrap ()
+ member self.scan_pop_bottom() : usize = self.scan_stack.pop_back().unwrap()
member self.advance_right() =
self.right <- self.right + 1
@@ -501,7 +501,7 @@ type Printer with
member self.get_top() : PrintStackElem =
self.print_stack
.last()
- .unwrap_or (
+ .unwrap_or(
{
offset = 0
pbreak = PrintStackBreak.Broken(Breaks.Inconsistent)
@@ -531,7 +531,7 @@ type Printer with
member self.print_end() =
debug ("print End -> pop End")
- self.print_stack.pop().unwrap () |> ignore
+ self.print_stack.pop().unwrap() |> ignore
member self.print_break(b: BreakToken, l: isize) =
let top = self.get_top ()
@@ -573,7 +573,7 @@ type Printer with
// self.out.reserve(self.pending_indentation)
// self.out.extend(std.iter.repeat(' ').take(self.pending_indentation))
- self.out.push_str (" ".repeat (self.pending_indentation))
+ self.out.push_str (" ".repeat(self.pending_indentation))
self.pending_indentation <- 0
self.out.push_str (s)
@@ -637,7 +637,7 @@ type Printer with
member self.hardbreak() = self.spaces (_SIZE_INFINITY)
member self.is_beginning_of_line() : bool =
- self.last_token().is_eof () || self.last_token().is_hardbreak_tok ()
+ self.last_token().is_eof() || self.last_token().is_hardbreak_tok()
static member hardbreak_tok_offset(off: isize) : Token =
Token.Break(
diff --git a/src/Fable.Transforms/Rust/AST/Rust.AST.State.fs b/src/Fable.Transforms/Rust/AST/Rust.AST.State.fs
index f4c59f6dae..ded92c2033 100644
--- a/src/Fable.Transforms/Rust/AST/Rust.AST.State.fs
+++ b/src/Fable.Transforms/Rust/AST/Rust.AST.State.fs
@@ -221,11 +221,11 @@ let literal_to_string (lit: token.Lit) : string =
| token.LitKind.Char -> format ("'{0}'", symbol)
| token.LitKind.Str -> format ("\"{0}\"", symbol)
| token.LitKind.StrRaw(n) ->
- let delim = "#".repeat (n |> usize)
+ let delim = "#".repeat(n |> usize)
format ("r{0}\"{1}\"{2}", delim, symbol, delim)
| token.LitKind.ByteStr -> format ("b\"{0}\"", symbol)
| token.LitKind.ByteStrRaw(n) ->
- let delim = "#".repeat (n |> usize)
+ let delim = "#".repeat(n |> usize)
format ("br{0}\"{1}\"{2}", delim, symbol, delim)
| token.LitKind.Integer
| token.LitKind.Float
@@ -238,7 +238,7 @@ let literal_to_string (lit: token.Lit) : string =
// out.push_str(suffix.as_str())
let visibility_qualified (vis: ast.Visibility, s: string) : string =
- let vis_str = State.new_().to_string (fun (s) -> s.print_visibility (vis))
+ let vis_str = State.new_().to_string(fun (s) -> s.print_visibility (vis))
format ("{0}{1}", vis_str, s)
// interface std.ops.Deref with // for State
@@ -440,7 +440,7 @@ type State with
| Some(cmnts) -> cmnts.current <- cmnts.current + 1
member self.next_comment() : Option =
- self.comments().and_then (fun (c) -> c.next ())
+ self.comments().and_then(fun (c) -> c.next ())
member self.print_literal(lit: ast.Lit) =
self.maybe_print_comment (lit.span.lo ())
@@ -451,7 +451,7 @@ type State with
match style with
| ast.StrStyle.Cooked -> format ("\"{0}\"", st.escape_debug ())
| ast.StrStyle.Raw(n) ->
- let delim = "#".repeat (n |> usize)
+ let delim = "#".repeat(n |> usize)
format ("r{0}\"{1}\"{2}", delim, st, delim)
self.s.word (st)
@@ -701,7 +701,7 @@ type State with
member self.break_offset_if_not_bol(n: usize, off: isize) =
if not (self.s.is_beginning_of_line ()) then
self.s.break_offset (n, off)
- elif off <> 0 && self.s.last_token().is_hardbreak_tok () then
+ elif off <> 0 && self.s.last_token().is_hardbreak_tok() then
// We do something pretty sketchy here: tuck the nonzero
// offset-adjustment we were going to deposit along with the
// break into the previous hardbreak.
@@ -717,7 +717,7 @@ type State with
| token.Nonterminal.NtBlock(e) -> self.block_to_string (e)
| token.Nonterminal.NtStmt(e) -> self.stmt_to_string (e)
| token.Nonterminal.NtPat(e) -> self.pat_to_string (e)
- | token.Nonterminal.NtIdent(e, is_raw) -> IdentPrinter.for_ast_ident(e, is_raw).to_string ()
+ | token.Nonterminal.NtIdent(e, is_raw) -> IdentPrinter.for_ast_ident(e, is_raw).to_string()
| token.Nonterminal.NtLifetime(e) -> e.to_string ()
| token.Nonterminal.NtLiteral(e) -> self.expr_to_string (e)
| token.Nonterminal.NtTT(tree) -> self.tt_to_string (tree)
@@ -774,7 +774,7 @@ type State with
| token.TokenKind.Literal(lit) -> literal_to_string (lit)
// Name components
- | token.TokenKind.Ident(s, is_raw) -> IdentPrinter.new_(s, is_raw, convert_dollar_crate).to_string ()
+ | token.TokenKind.Ident(s, is_raw) -> IdentPrinter.new_(s, is_raw, convert_dollar_crate).to_string()
| token.TokenKind.Lifetime(s) -> s.to_string ()
// Other
@@ -858,7 +858,7 @@ type State with
member self.comments() : Option = self.comments_
member self.print_ident(ident: Ident) =
- self.s.word (IdentPrinter.for_ast_ident(ident, ident.is_raw_guess ()).to_string ())
+ self.s.word (IdentPrinter.for_ast_ident(ident, ident.is_raw_guess ()).to_string())
self.ann.post (self, AnnNode.Ident(ident))
@@ -912,14 +912,14 @@ type State with
let mutable i = 0
for elt in elts do
- self.maybe_print_comment (get_span(elt).hi ())
+ self.maybe_print_comment (get_span(elt).hi())
op (self, elt)
i <- i + 1
if i < len then
self.s.word (",")
- self.maybe_print_trailing_comment (get_span (elt), Some(get_span(elts[i]).hi ()))
+ self.maybe_print_trailing_comment (get_span (elt), Some(get_span(elts[i]).hi()))
self.s.space_if_not_bol ()
@@ -1593,7 +1593,7 @@ type State with
self.print_expr_cond_paren (
scrutinee,
self.cond_needs_par (scrutinee)
- || parser.needs_par_as_let_scrutinee (scrutinee.precedence().order ())
+ || parser.needs_par_as_let_scrutinee (scrutinee.precedence().order())
)
member self.print_else(els: Option) =
@@ -1645,7 +1645,7 @@ type State with
self.s.pclose ()
member self.print_expr_maybe_paren(expr: ast.Expr, prec: i8) =
- self.print_expr_cond_paren (expr, expr.precedence().order () < prec)
+ self.print_expr_cond_paren (expr, expr.precedence().order() < prec)
/// Prints an expr using syntax that's acceptable in a condition position, such as the `cond` in
/// `if cond then ... }`.
@@ -2766,7 +2766,7 @@ type State with
member self.print_remaining_comments() =
// If there aren't any remaining comments, then we need to manually
// make sure there is a line break at the end_.
- if self.next_comment().is_none () then
+ if self.next_comment().is_none() then
self.s.hardbreak ()
let mutable cmnt = self.next_comment ()
diff --git a/src/Fable.Transforms/Rust/AST/Tests/Tests.fs b/src/Fable.Transforms/Rust/AST/Tests/Tests.fs
index d80fc81537..0a3eaa9985 100644
--- a/src/Fable.Transforms/Rust/AST/Tests/Tests.fs
+++ b/src/Fable.Transforms/Rust/AST/Tests/Tests.fs
@@ -17,7 +17,7 @@ module Helpers =
let fun_to_string (decl: FnDecl, header: FnHeader, name: Ident, generics: Generics) : string =
State
.new_()
- .to_string (fun (s) ->
+ .to_string(fun (s) ->
s.head ("")
s.print_fn (decl, header, Some(name), generics)
s.s.end_ () // Close the head box.
@@ -25,7 +25,7 @@ module Helpers =
)
let variant_to_string (var: Variant) : string =
- State.new_().to_string (fun (s) -> s.print_variant (var))
+ State.new_().to_string(fun (s) -> s.print_variant (var))
[]
let test_fun_to_string () =
diff --git a/src/Fable.Transforms/Rust/Fable2Rust.fs b/src/Fable.Transforms/Rust/Fable2Rust.fs
index 1aab73ba9f..9f6c184b7b 100644
--- a/src/Fable.Transforms/Rust/Fable2Rust.fs
+++ b/src/Fable.Transforms/Rust/Fable2Rust.fs
@@ -899,7 +899,7 @@ module TypeInfo =
| [ Fable.Unit ] -> []
| _ -> argTypes
- let argCount = string (List.length argTypes)
+ let argCount = string(List.length argTypes)
let genArgs = argTypes @ [ returnType ]
transformImportType com ctx genArgs "Native" ("Func" + argCount)
@@ -1047,7 +1047,7 @@ module TypeInfo =
transformGenericType com ctx genArgs (rawIdent "Result")
let transformChoiceType com ctx genArgs : Rust.Ty =
- let argCount = string (List.length genArgs)
+ let argCount = string(List.length genArgs)
transformImportType com ctx genArgs "Choice" ("Choice`" + argCount)
let transformRefCellType com ctx genArg : Rust.Ty =
@@ -1802,7 +1802,7 @@ module Util =
| [ Fable.Unit ] -> []
| _ -> argTypes
- let argCount = string (List.length argTypes)
+ let argCount = string(List.length argTypes)
let funcWrap = getLibraryImportName com ctx "Native" ("Func" + argCount)
let expr = transformIdent com ctx None ident
diff --git a/src/fable-compiler-js/src/app.fs b/src/fable-compiler-js/src/app.fs
index e9d64032e2..3b077acd13 100644
--- a/src/fable-compiler-js/src/app.fs
+++ b/src/fable-compiler-js/src/app.fs
@@ -179,7 +179,7 @@ type SourceWriter(sourcePath, targetPath, projDir, options: CmdLineOptions, file
member _.Dispose() = ()
- member _.SourceMap = mapGenerator.Force().toJSON ()
+ member _.SourceMap = mapGenerator.Force().toJSON()
member _.Result = sb.ToString()
let printErrors showWarnings (errors: Fable.Standalone.Error[]) =
diff --git a/src/fable-library-rust/src/Quotation.fs b/src/fable-library-rust/src/Quotation.fs
index feae382ce1..9cdebc2d7e 100644
--- a/src/fable-library-rust/src/Quotation.fs
+++ b/src/fable-library-rust/src/Quotation.fs
@@ -398,8 +398,8 @@ let private applyOperator (method: string) (args: obj list) : obj =
// invalid at runtime. Matching only on the method string avoids that.
// if/elif (not match): Fable-Rust would emit string literals as match patterns,
// which isn't valid Rust; an if-chain compiles to string == comparisons.
- let i (n: int) : int = unbox (List.item n args)
- let b (n: int) : bool = unbox (List.item n args)
+ let i (n: int) : int = unbox(List.item n args)
+ let b (n: int) : bool = unbox(List.item n args)
if method = "op_Addition" then
box (i 0 + i 1)
@@ -453,13 +453,13 @@ let evaluate (e: FSharpExpr) : obj =
let capturedEnv = env.Value
box (fun (arg: obj) -> eval (ref (Map.add v.Name arg capturedEnv)) body)
| ExprApplication(f, a) ->
- let func = unbox obj> (eval env f)
+ let func = unbox obj>(eval env f)
func (eval env a)
| ExprLet(v, value, body) ->
let value = eval env value
eval (ref (Map.add v.Name value env.Value)) body
| ExprIfThenElse(g, t, el) ->
- if unbox (eval env g) then
+ if unbox(eval env g) then
eval env t
else
eval env el
@@ -472,7 +472,7 @@ let evaluate (e: FSharpExpr) : obj =
match method with
| "get_IsSome"
| "get_IsNone" ->
- let values = unbox (eval env instance)
+ let values = unbox(eval env instance)
let isSome = values.Length > 0 && unbox values.[0] = 1
box (
@@ -483,7 +483,7 @@ let evaluate (e: FSharpExpr) : obj =
)
| "get_IsCons"
| "get_IsEmpty" ->
- let values = unbox (eval env instance)
+ let values = unbox(eval env instance)
let isCons = values.Length > 0
box (
@@ -503,7 +503,7 @@ let evaluate (e: FSharpExpr) : obj =
// operator wants an owned i32; `index + 0` forces an owned i32 rvalue (the
// arithmetic dereferences the borrow) so the indexing type-checks.
let i = index + 0
- evalArrayField (unbox (eval env inner)) i
+ evalArrayField (unbox(eval env inner)) i
| ExprNewUnion(_, tag, _, fields) ->
let values = ResizeArray()
values.Add(box tag)
@@ -524,18 +524,18 @@ let evaluate (e: FSharpExpr) : obj =
let result = ResizeArray()
result.Add(eval env head)
- for value in unbox (eval env tail) do
+ for value in unbox(eval env tail) do
result.Add(value)
box (result.ToArray())
| ExprUnionTag inner ->
- let values = unbox (eval env inner)
+ let values = unbox(eval env inner)
evalArrayField values 0
| ExprUnionField(inner, fieldIndex) ->
- let values = unbox (eval env inner)
+ let values = unbox(eval env inner)
evalArrayField values (fieldIndex + 1)
| ExprFieldGet(inner, fieldName) ->
- let values = unbox (eval env inner)
+ let values = unbox(eval env inner)
if fieldName = "Head" then
evalArrayField values 0
@@ -557,7 +557,7 @@ let evaluate (e: FSharpExpr) : obj =
| Some value -> value
| None -> failwithf "Quotation field not found: %s" fieldName
| ExprFieldSet(target, fieldName, value) ->
- let target = unbox (eval env target)
+ let target = unbox(eval env target)
let value = eval env value
let rec findFieldIndex index =
diff --git a/src/fable-library-rust/src/System.Collections.Generic.fs b/src/fable-library-rust/src/System.Collections.Generic.fs
index ac2461e630..e4e5f79f17 100644
--- a/src/fable-library-rust/src/System.Collections.Generic.fs
+++ b/src/fable-library-rust/src/System.Collections.Generic.fs
@@ -48,7 +48,7 @@ type Stack<'T when 'T: equality> private (initialContents: 'T[], initialCount) =
new(initialCapacity: int)
=
- let arr = Array.zeroCreate<'T> (initialCapacity)
+ let arr = Array.zeroCreate<'T>(initialCapacity)
Stack<'T>(arr, 0)
new() = Stack<'T>(4)
@@ -177,7 +177,7 @@ type Queue<'T when 'T: equality> private (initialContents, initialCount) =
if initialCapacity < 0 then
failwith "capacity is less than 0"
- Queue<'T>(Array.zeroCreate<'T> (initialCapacity), 0)
+ Queue<'T>(Array.zeroCreate<'T>(initialCapacity), 0)
new() = Queue<'T>(4)
diff --git a/src/fable-library-ts/System.Collections.Generic.fs b/src/fable-library-ts/System.Collections.Generic.fs
index 2623852e62..d282f67a14 100644
--- a/src/fable-library-ts/System.Collections.Generic.fs
+++ b/src/fable-library-ts/System.Collections.Generic.fs
@@ -46,7 +46,7 @@ type Stack<'T> private (initialContents, initialCount) =
let mutable contents = initialContents
let mutable count = initialCount
- new(initialCapacity: int) = Stack<'T>(Array.zeroCreate<'T> (initialCapacity), 0)
+ new(initialCapacity: int) = Stack<'T>(Array.zeroCreate<'T>(initialCapacity), 0)
new() = Stack<'T>(4)
@@ -174,7 +174,7 @@ type Queue<'T> private (initialContents, initialCount) =
if initialCapacity < 0 then
raise (System.ArgumentOutOfRangeException("capacity is less than 0"))
- Queue<'T>(Array.zeroCreate<'T> (initialCapacity), 0)
+ Queue<'T>(Array.zeroCreate<'T>(initialCapacity), 0)
new() = Queue<'T>(4)
diff --git a/src/fable-standalone/src/Worker/Shared.fs b/src/fable-standalone/src/Worker/Shared.fs
index b0b2e3a164..c4c3ebd528 100644
--- a/src/fable-standalone/src/Worker/Shared.fs
+++ b/src/fable-standalone/src/Worker/Shared.fs
@@ -56,7 +56,7 @@ type WorkerRequest =
| GetCompletionsForFile of id: Guid * file: string * line: int * column: int * lineText: string
| GetDeclarationLocationForFile of id: Guid * file: string * line: int * column: int * lineText: string
- static member Decoder = Decode.Auto.generateDecoder ()
+ static member Decoder = Decode.Auto.generateDecoder()
type CompileStats =
{
@@ -76,7 +76,7 @@ type WorkerAnswer =
| FoundCompletions of id: Guid * Fable.Standalone.Completion[]
| FoundDeclarationLocation of id: Guid (* line1, col1, line2, col2 *) * (int * int * int * int) option
- static member Decoder = Decode.Auto.generateDecoder ()
+ static member Decoder = Decode.Auto.generateDecoder()
type ObservableWorker<'InMsg>(worker: obj, decoder: Decoder<'InMsg>, ?name: string) =
let name = defaultArg name "FABLE WORKER"
diff --git a/src/fable-standalone/src/Worker/Worker.fs b/src/fable-standalone/src/Worker/Worker.fs
index 1097937b16..ec5c7dced5 100644
--- a/src/fable-standalone/src/Worker/Worker.fs
+++ b/src/fable-standalone/src/Worker/Worker.fs
@@ -29,9 +29,9 @@ let getAssemblyReader (_getBlobUrl: string -> string, _refs: string[]) : JS.Prom
let escapeJsStringLiteral (str: string) : string = importMember "./util.js"
let measureTime f arg =
- let before: float = self?performance?now ()
+ let before: float = self?performance?now()
let res = f arg
- let after: float = self?performance?now ()
+ let after: float = self?performance?now()
res, after - before
type PrecompiledState =
@@ -291,7 +291,8 @@ let private compileFiles fable fsharpNames fsharpCodes (filesToEmit: string[]) l
if not (parseResults.Errors |> Array.exists (fun e -> not e.IsWarning)) then
for fileName in filesToEmit do
- let! code, fableErrors, transformTime = emitFile fable parseResults fileName language fableOptions
+ let! code, fableErrors, transformTime =
+ emitFile fable parseResults fileName language fableOptions
compiledCode.Add code
errors.AddRange fableErrors
@@ -419,7 +420,8 @@ let rec loop (box: MailboxProcessor) (state: State) =
else
filesToEmit
- let! (code, errors, stats) = compileFiles fable names codes filesToEmit language otherFSharpOptions
+ let! (code, errors, stats) =
+ compileFiles fable names codes filesToEmit language otherFSharpOptions
CompilationsFinished(code, language, errors, stats) |> state.Worker.Post
with er ->
diff --git a/src/fable-standalone/test/bench-compiler/app.fs b/src/fable-standalone/test/bench-compiler/app.fs
index f5997ee673..9e95c18c0f 100644
--- a/src/fable-standalone/test/bench-compiler/app.fs
+++ b/src/fable-standalone/test/bench-compiler/app.fs
@@ -147,7 +147,7 @@ type SourceWriter(sourcePath, targetPath, projDir, options: CmdLineOptions, file
member _.Dispose() = ()
- member _.SourceMap = mapGenerator.Force().toJSON ()
+ member _.SourceMap = mapGenerator.Force().toJSON()
member _.Result = sb.ToString()
let printErrors showWarnings (errors: Fable.Standalone.Error[]) =
diff --git a/tests/Python/Fable.Tests.Python.fsproj b/tests/Python/Fable.Tests.Python.fsproj
index a86f7654c6..7cc7ffee62 100644
--- a/tests/Python/Fable.Tests.Python.fsproj
+++ b/tests/Python/Fable.Tests.Python.fsproj
@@ -9,7 +9,7 @@
Fable.Tests
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/Rust/Fable.Tests.Rust.fsproj b/tests/Rust/Fable.Tests.Rust.fsproj
index 471dd3770b..03139f9f9f 100644
--- a/tests/Rust/Fable.Tests.Rust.fsproj
+++ b/tests/Rust/Fable.Tests.Rust.fsproj
@@ -7,7 +7,7 @@
Preview
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive