How to write
given foo[B <: Boolean]: Bar[B]()
given foo: [B <: Boolean] => Bar[B]()
here is the documentation: Given Instances
Worth noting that is the epfl site. That is what I have bookmarked, but occasionally I go to the scala-lang reference to share. I hadn’t even noticed that new givens wasn’t published yet.
By coincidence, I had contributed some given words over summer, with the joking (not joking) note that my change wouldn’t last long, and indeed, the section was entirely refreshed.
Let me add, I was impressed by the diligence in documentation.
The three copies of the syntax summary is a bit too diligent, perhaps.
Just today, I was trying to help with a corner of the spec (until I realized I don’t actually know how top-level defs works), and it will surely be nice when the spec is approximately up-to-date.