Commit Graph

14519 Commits

Author SHA1 Message Date
extempore 34368e6cd4 Re-de-case-classed scala.xml.Text as described in r20450, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25318 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 20:40:19 +00:00
extempore 0bca4da373 Removed classes and methods deprecated before 2.8.
Contributed by Simon Ochsenreither.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25317 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 20:40:11 +00:00
extempore d7e7ce0b92 Reverting recent type constructor patch until I can see why
scalacheck is getting blinkered by it.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25316 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 12:45:46 +00:00
extempore a016557d1a Test case for ticket #4582.
Contributed by Daniel C. Sobral.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25315 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 12:37:12 +00:00
extempore 6238fb971e document scala.util.control.Breaks methods
Authored by Chris League and Roland Kuhn

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25314 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 12:32:39 +00:00
extempore bbb5cd2643 collection docs: fix copy-paste errors in GenTraversableOnce
In r24752, the documentation of reduce, reduceOption, fold, and aggregate
were copied verbatim from ParIterableLike to the new GenTraversableOnceLike,
and in r24786 they were brought along as GenTraversableOnce replaced
GenTraversableOnceLike.  Some bits of what they said were appropriate
for ParIterableLike but are no longer appropriate here.

Contributed by Greg Price.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25313 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 12:32:31 +00:00
odersky c50c7e0d16 Changes to reflection. First reflection test runs. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25312 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 09:53:47 +00:00
extempore 0daba0538c Some post-facto patch cleanups, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25311 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:52:37 +00:00
extempore aa3b646fc5 Fleshed out scala.math.Ordered documentation.
Contributed by josh marcus.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25310 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:52:27 +00:00
extempore 8eb4136613 Basic scaladoc for some scala.math classes.
Contributed by desterkin.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25309 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:52:17 +00:00
extempore 7f5c8e59d0 Fix wiki markup of Equiv.scala. From Josh Marcus.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25308 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:52:09 +00:00
extempore b1bd186379 Fix Benchmark documentation to match current arguments.
Contributed by Josh Marcus.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25307 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:52:00 +00:00
extempore db30643d84 Basic scaladoc for Vector.
This gives a minimal introduction, and sets a number
of macros so that inherited documentation is clearer.

Contributed by Greg Price.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25306 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:51:53 +00:00
extempore c7072c8df6 Documentation and examples for Regex.
Contributed by Daniel C. Sobral

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25305 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:51:44 +00:00
extempore 0e66914f26 Added Vector class documentation. Contributed by Jamie Allen.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25304 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:51:35 +00:00
extempore 3c940948cd Added documentation for RichInt.
Contributed by Marc Weil.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25303 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:51:26 +00:00
extempore 54c8166f67 Make IterableLike.toIterator more efficient
Override TraversableLike.toIterator which uses unnecessary toStream.

Fixes SI-4802.  Contributed by Yang Zhang.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25302 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:51:19 +00:00
extempore c36ce496ed Fixed a big bug in type constructor unification caused by
considering only the parents rather than all the base types.
This fix is a testament to the power of haranguing people
in bars when you are deeply offended by a bug, like someone
was by this one:

  def f[CC[X] <: Traversable[X]](x: CC[Int]) = ()
  f(1 to 5)   // did not compile! Fear not, it does now

Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25301 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:44:13 +00:00
extempore 9050577097 A whole bunch of documentation on Trees, arrested in progress.
(Eventually should be reviewed but not yet so) no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25300 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 05:44:02 +00:00
extempore ad548466c6 Beginning to document scala.util.continuations with a use case.
Authored by Chris League and Roland Kuhn.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25299 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 23:29:07 +00:00
extempore 0697a5f71b Add documentation to Boolean. Contributed by Marc Weil and soc.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25298 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 23:28:59 +00:00
extempore 4bc6703f68 Merge pull request #42 from jamie-allen/master
DocSpree

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25297 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 22:59:08 +00:00
extempore 16f36d0857 Additional documentation for the Array type, with short code examples of construction, access and
update. Also links to ArrayOps and WrappedArray in order to explain where the additional collections
operations come from.  Contributed by iainmcgin@gmail.com.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25296 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 22:39:34 +00:00
extempore debee3275f Some minor scaladoc tweaks and deletion of incorrect scaladoc docs,
no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25295 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 22:00:28 +00:00
Jamie Allen 2a34ef0e39 Added descriptive StreamIterator comment 2011-07-15 17:38:51 -04:00
michelou 4314d6314a scaladoc fixes and improvements
Changes to scaladoc include:

- fixed transformation of Code(text) into HTML tag <code>
- added tool tips for deprecated entities (classes, methods)
  using the 'title' attribute
- added syntax highlighting of Scala source code in generated
  <pre> blocks (CSS colors are defined in lib/template.css)

Here are several examples of highlighted Scala code:

scala.App
scala.Application
scala.Enumeration
scala.Function1
scala.Function2
scala.native
scala.Option
scala.Proxy
scala.specialized
scala.throws
scala.unchecked

scala.actors.Actor
scala.annotation.deprecatedName
scala.annotation.elidable
scala.annotation.switch

scala.collection.DefaultMap
scala.collection.JavaConversions
scala.collection.JavaConverters
scala.collection.LinearSeqLike
scala.collection.MapLike
scala.collection.SetLike
scala.collection.TraversableLike
scala.collection.immutable.NumericRange
scala.collection.immutable.Range
scala.collection.immutable.Stream
scala.collection.mutable.BufferLike

scala.concurrent.pilib
scala.io.Position
scala.reflect.BeanProperty
scala.reflect.Manifest
scala.testing.Benchmark

scala.util.DynamicVariable
scala.util.control.Breaks
scala.util.control.ControlThrowable
scala.util.control.Exception
scala.util.control.TailCalls
scala.util.logging.Logged
scala.util.parsing.combinator.testing.Tester
scala.util.parsing.json.JSON
scala.util.regexp.WordExp

scala.xml.factory.LoggedNodeFactory
scala.xml.parsing.ConstructingParser



git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25294 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 21:38:03 +00:00
michelou 22c15143a5 3rd round of clean ups (see r25285, r25292)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25293 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 20:20:47 +00:00
michelou 9f6e8eeb14 2nd round of clean ups (see r25285)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25292 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 16:25:42 +00:00
dragos 661cfc6ea9 Added the new packages to MANIFEST.MF to enable plugin builds and tests.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25287 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-15 08:51:40 +00:00
extempore cd68582584 Adding some Sets/Maps to perRunCaches, and eliminating ambiguously named imports.
Did a tour of the compiler adding a few longer-lived mutable structures
to the per-run cache clearing mechanism. Some of these were not a big
threat, but there is (almost) literally no cost to tracking them and the
fewer mutable structures which are created "lone wolf style" the easier
it is to spot the one playing by his own rules.

While I was at it I followed through on long held ambition to eliminate
the importing of highly ambiguous names like "Map" and "HashSet" from
the mutable and immutable packages. I didn't quite manage elimination
but it's pretty close. Something potentially as pernicious which I
didn't do much about is this import:

  import scala.collection._

Imagine coming across that one on lines 407 and 474 of a 1271 file.
That's not cool. Some poor future programmer will be on line 1100 and
use "Map[A, B]" in some function and only after the product has shipped
will it be discovered that the signature is wrong and the rocket will
now be crashing into the mountainside straightaway.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25286 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-14 01:27:04 +00:00
michelou 70e3df382b cleanups (scaladoc 2, deprecation warnings, trailing blanks)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25285 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 20:31:32 +00:00
grek 0caf5ea54c Fix printing of Char constants.
Fixed bug in printing of Char Constants logic
used by Tree printers.

Fixes #4792. No review.



git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25284 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 12:13:31 +00:00
grek c30f0bf306 Get rid of structural type in Iterator.scala
Implementation of Iterator.scala defined a structural type
by mistake. By naming a class we get rid of that structural
type.

Fixes #4791. No review.



git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25283 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 11:39:16 +00:00
plocinic f9ce00fcc4 prohibit case-to-case inheritance instead of issuing warning. closes #4109. review by extempore, since it should make your life much easier in the pattern matcher
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25282 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 08:05:04 +00:00
extempore 9d327535c9 Don't enter into same line infinite recursion when erroneous
code involves a self-normalizing type alias.  Closes #3240, review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25281 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 07:07:02 +00:00
extempore 0bd1e96e5c Test case closes #3371, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25280 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:53 +00:00
extempore 3da87e0204 Test case closes #1432, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25279 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:39 +00:00
extempore 5d8be99078 Restored partest behavior of keeping output directories when run
with debugging enabled.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25278 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:25 +00:00
extempore e9922dcc52 Bounded wildcard types arising during pattern type inference can
cause unnecessary crashes.  Closes #1048, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25277 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 06:58:04 +00:00
extempore e44b754a42 Catch type projections even when they disguise themselves as
stable via singleton bounds.  Closes #1431, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25276 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 05:08:12 +00:00
extempore 2ec3e09aa6 A response to adriaan's last lub commit of the housekeeping and
pretty printing variety.  Non-invasive surgery, don't worry martin.
Simplified the input to lublist a bit.  Includes illustrative
test case for current brand of lub failures.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25275 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 02:08:43 +00:00
extempore fffca8c709 Suppressed an error in type constructor bounds checking which
was obscuring the meaningful error to follow.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25274 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-13 02:08:24 +00:00
extempore 0713049c3a Making power mode startup a little less glacial, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25273 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 21:59:11 +00:00
extempore 13ba58e706 A bunch of repl stuff. Smoothed out issues with singleton
type mismatches, for real this time.  :power mode goes to
phase typer automatically.

You can get the symbols for repl-defined names more directly:

  scala> case class Bippy(x: Int)
  defined class Bippy

  scala> intp.terms("Bippy")
  res1: intp.global.Symbol = object Bippy

  scala> intp.types("Bippy")
  res2: intp.global.Symbol = class Bippy

  scala> intp("Bippy") // tries type first
  res3: intp.global.Symbol = class Bippy

  scala> intp("scala.collection.Map") // falls back to fully qualified
  res4: intp.global.Symbol = trait Map

I changed the implicit which used to install "tpe" and "symbol"
to install "tpe_" and "symbol_" because it was too easy to do something
you didn't mean to, like calling x.tpe where x is a Manifest.

Said implicit now handles manifest type arguments, so you can get
the full translation from a manifest representation to a compiler type,
at least for simple types and only as much as manifests work, which is
not that much.  Fortunately that situation is all changing soon.

  scala> List(List(1, 2, 3)).tpe_
  res5: power.Type = List[List[Int]]

  scala> res5.typeArgs
  res6: List[power.global.Type] = List(List[Int])

Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25272 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 19:43:14 +00:00
extempore 8e5dab1dc8 Fixed some unnecessary chattiness and poor function naming in tree
checkers, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25271 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 19:42:50 +00:00
michelou 86dfc660d8 Seeing about getting trunk building again, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25270 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 18:42:00 +00:00
odersky 7d97f5a86a More work done on implementing reflection. But still very mich in progress.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25269 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-12 13:32:33 +00:00
extempore 60dc5da3e3 Seeing about getting trunk building again, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25268 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 23:01:51 +00:00
extempore da85e3d5e5 Misc smoothing of tree creation, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25267 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 20:40:05 +00:00
extempore 3190280d30 Implemented workaround for SI-4789, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25266 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-11 20:39:43 +00:00