diff --git a/Shader Minifier.fsproj b/Shader Minifier.fsproj
index aed65c76..1559ad85 100644
--- a/Shader Minifier.fsproj
+++ b/Shader Minifier.fsproj
@@ -61,7 +61,6 @@
Always
-
diff --git a/src/options.fs b/src/options.fs
index 7fa4f43d..683bcf31 100644
--- a/src/options.fs
+++ b/src/options.fs
@@ -1,6 +1,5 @@
module Options
-open System.Collections.Generic
open System.IO
open Argu
diff --git a/src/parse.fs b/src/parse.fs
index 20958676..6a2e4aed 100644
--- a/src/parse.fs
+++ b/src/parse.fs
@@ -127,7 +127,7 @@ module private ParseImpl =
]
// Add all the operators in the OperatorParser
- let makeOperator =
+ let () =
// we start with operators with highest priority, then we decrement the counter.
let mutable precCounter = 20 //(we have at most 20 different priorities)
let addInfix li =
@@ -164,9 +164,9 @@ module private ParseImpl =
// Restriction on field names
let check ((_,l) as arg : Ast.Decl) =
- List.iter (fun (decl:Ast.DeclElt) ->
+ for decl in l do
if decl.name.Name <> Rewriter.renameField decl.name.Name then
- failwithf "Record field name '%s' is not allowed by Shader Minifier,\nbecause it looks like a vec4 field name." decl.name.Name) l
+ failwithf "Record field name '%s' is not allowed by Shader Minifier,\nbecause it looks like a vec4 field name." decl.name.Name
arg
let decls = many (declaration .>> ch ';' |>> check)
@@ -280,7 +280,7 @@ module private ParseImpl =
let list = many statement |>> Ast.Block
between (ch '{') (ch '}') list
- let mutable private forbiddenNames = [ "if"; "in"; "do" ]
+ let mutable private forbiddenNames = []
let macro =
let nl = skipComment >>. skipMany (pchar '\\' >>. newline)
diff --git a/src/renamer.fs b/src/renamer.fs
index 9884f728..38375e79 100644
--- a/src/renamer.fs
+++ b/src/renamer.fs
@@ -53,14 +53,11 @@ module private RenamerImpl =
let computeContextTable text =
let contextTable = new HashMultiMap<(char*char), int>(HashIdentity.Structural)
- Seq.pairwise text |> Seq.iter (fun (prev, next) ->
+ for prev, next in Seq.pairwise text do
match contextTable.TryFind (prev, next) with
| Some n -> contextTable.[(prev, next)] <- n + 1
| None -> contextTable.[(prev, next)] <- 1
- )
contextTable
- //let chars, n = Seq.maxBy snd [for pair in contextTable -> pair.Key, pair.Value]
- //printfn "max occ: %A -> %d" chars n
// /!\ This function is a performance bottleneck.
let chooseIdent (contextTable: HashMultiMap<(char*char), int>) ident candidates =