4
  • Create a new scala project
  • add library reference to scalaz
  • create a new package
  • create a scala file in the package
  • set encoding to UTF-8
  • paste the content of the bifunctor example
  • adjust the package in the file

It works in intellij. With eclipse i get 8 errors like this:

';' expected but something found

in the lines containing assert_≟ .

I'm using Eclipse Helios with Scala IDE for Eclipse 1.0.0.201011110258.

skaffman
  • 398,947
  • 96
  • 818
  • 769
onof
  • 17,167
  • 7
  • 49
  • 85

1 Answers1

2
  • Are you using the correct character set (e.g. UTF8) for you source files?
  • Are the Eclipse "errors" from the IDE itself, or from a compilation run (an invocation of scalac?
  • Can you scalac compile the source file manually?

Assuming it is not a fie encoding problem and that you can manually compile the file, I might conclude that, as scalaz uses complex type inference, Eclipse might be reporting erroneous errors.

oxbow_lakes
  • 133,303
  • 56
  • 317
  • 449
  • On Eclipse, i open File/Properties and set UTF-8 encoding. Anyway, the same file works with IntelliJ. – onof Nov 13 '10 at 22:17
  • I have found. The problem is that Eclipse editor is buggy with encodings. I had to change file encoding via JEdit to set UTF-8. Before doing this i got the same errors invoking scalac manually. Thank you for the help. – onof Nov 15 '10 at 16:07