Skip to content

Commit

Permalink
Upgrade to FCS 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dungpa committed Oct 24, 2016
1 parent 2b0c72d commit c6f08a3
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
Binary file modified .paket/paket.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.3.0 - 24-10-2016
* Upgrade to FCS 8.0.0

#### 2.3.0 - 10-07-2016
* Upgrade to FCS 5.0.0

Expand Down
2 changes: 1 addition & 1 deletion paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NUGET
FAKE (4.2)
FsCheck (2.0.7)
FSharp.Core (>= 3.1.2.5)
FSharp.Compiler.Service (5.0.0)
FSharp.Compiler.Service (8.0.0)
FSharp.Core (4.0.0.1)
FsUnit (1.3.0.1) - framework: >= net45
NUnit (>= 2.6.3)
Expand Down
3 changes: 2 additions & 1 deletion src/Fantomas.Tests/FormattingPropertyTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ let rec shrinkSynExpr = function
| SynExpr.ArbitraryAfterError _
| SynExpr.FromParseError _
| SynExpr.DiscardAfterMissingQualificationAfterDot _
| SynExpr.Fixed _ -> Seq.empty
| SynExpr.Fixed _
| SynExpr.StructTuple _ -> Seq.empty

and collectSynExpr expr =
seq { yield expr
Expand Down
10 changes: 6 additions & 4 deletions src/Fantomas/CodeFormatterImpl.fs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ let isValidAST ast =
| SynExpr.FromParseError(_synExpr, _range)
| SynExpr.DiscardAfterMissingQualificationAfterDot(_synExpr, _range) ->
false
| SynExpr.Fixed _ ->
| SynExpr.Fixed _
| SynExpr.StructTuple _ ->
true

and validatePattern = function
Expand Down Expand Up @@ -319,7 +320,8 @@ let isValidAST ast =
| SynPat.QuoteExpr(expr, _range) ->
validateExpr expr
| SynPat.DeprecatedCharRange _
| SynPat.InstanceMember _ -> true
| SynPat.InstanceMember _
| SynPat.StructTuple _ -> true
| SynPat.FromParseError _ -> false

and validateConstructorArgs = function
Expand Down Expand Up @@ -617,7 +619,7 @@ let formatSelection (range : range) config ({ Source = sourceCode; FileName = f
/// Format a selected part of source string using given config; expanded selected ranges to parsable ranges.
let formatSelectionExpanded (range : range) config ({ FileName = fileName; Source = sourceCode } as formatContext) =
let lines = String.normalizeThenSplitNewLine sourceCode
let sourceTokenizer = SourceTokenizer([], fileName)
let sourceTokenizer = SourceTokenizer([], Some fileName)

// Move to the section with real contents
let contentRange =
Expand Down Expand Up @@ -665,7 +667,7 @@ let makePos line col = mkPos line col
/// Infer selection around cursor by looking for a pair of '[' and ']', '{' and '}' or '(' and ')'.
let inferSelectionFromCursorPos (cursorPos : pos) fileName (sourceCode : string) =
let lines = String.normalizeThenSplitNewLine sourceCode
let sourceTokenizer = SourceTokenizer([], fileName)
let sourceTokenizer = SourceTokenizer([], Some fileName)
let openDelimiters = dict ["[", List; "[|", Array; "{", SequenceOrRecord; "(", Tuple]
let closeDelimiters = dict ["]", List; "|]", Array; "}", SequenceOrRecord; ")", Tuple]

Expand Down
3 changes: 2 additions & 1 deletion src/Fantomas/SourceParser.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,8 @@ let (|TyparSingle|TyparDefaultsToType|TyparSubtypeOfType|TyparSupportsMember|Typ
| WhereTyparIsEquatable(tp, _) -> TyparSingle(TyparIsEquatable, tp)
| WhereTyparDefaultsToType(tp, t, _) -> TyparDefaultsToType(tp, t)
| WhereTyparSubtypeOfType(tp, t, _) -> TyparSubtypeOfType(tp, t)
| WhereTyparSupportsMember(tps, msg, _) -> TyparSupportsMember(tps, msg)
| WhereTyparSupportsMember(tps, msg, _) ->
TyparSupportsMember(List.choose (function SynType.Var(tp, _) -> Some tp | _ -> None) tps, msg)
| WhereTyparIsEnum(tp, ts, _) -> TyparIsEnum(tp, ts)
| WhereTyparIsDelegate(tp, ts, _) -> TyparIsDelegate(tp, ts)

Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas/TokenMatcher.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Token =

let tokenize defines (content : string) =
seq {
let sourceTokenizer = SourceTokenizer(defines, "/tmp.fsx")
let sourceTokenizer = SourceTokenizer(defines, Some "/tmp.fsx")
let lines = String.normalizeThenSplitNewLine content
let lexState = ref 0L
for (i, line) in lines |> Seq.zip [1..lines.Length] do
Expand Down

0 comments on commit c6f08a3

Please sign in to comment.