Skip to content

Commit

Permalink
Fix typo in doc page and update MimaFilters, pickling excludes
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Mar 31, 2024
1 parent 7d754d6 commit dc8c708
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/test/dotc/pos-test-pickling.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ i15525.scala

# alias types at different levels of dereferencing
parsercombinators-givens.scala
parsercombinators-givens-2.scala
parsercombinators-ctx-bounds.scala
parsercombinators-this.scala
parsercombinators-arrow.scala
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/reference/experimental/typeclasses-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def reduce[A : Monoid](xs: List[A]): A = ???
Since we don't have a name for the `Monoid` instance of `A`, we need to resort to `summon` in the body of `reduce`:
```scala
def reduce[A : Monoid](xs: List[A]): A =
xs.foldLeft(summon Monoid[A])(_ `combine` _)
xs.foldLeft(summon[Monoid[A]].unit)(_ `combine` _)
```
That's generally considered too painful to write and read, hence people usually adopt one of two alternatives. Either, eschew context bounds and switch to using clauses:
```scala
Expand Down
1 change: 1 addition & 0 deletions project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ object MiMaFilters {
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language#experimental.modularity"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$experimental$modularity$"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compiletime.package#package.deferred"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.internal.WitnessNames"),
),

// Additions since last LTS
Expand Down

0 comments on commit dc8c708

Please sign in to comment.