<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.scala.user">
    <title>gmane.comp.lang.scala.user</title>
    <link>http://blog.gmane.org/gmane.comp.lang.scala.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53566"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53565"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53564"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53563"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53562"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53561"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53560"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53559"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53558"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53557"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53556"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53555"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53554"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53553"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53552"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53551"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53550"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53549"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53548"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.scala.user/53547"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53566">
    <title>Re: Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53566</link>
    <description>&lt;pre&gt;Yep, it does.

Have you tried -Yreify-copypaste? It should be more suitable for that
purpose.

On 24 May 2012 20:07, Paul Butcher &amp;lt;paul-q9qwgYRQEc9WkMItezQGDw&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eugene Burmako</dc:creator>
    <dc:date>2012-05-24T18:41:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53565">
    <title>Re: converting type parameters (with self types) to abstract type members</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53565</link>
    <description>&lt;pre&gt;

My rule of thumb is that I use generics where the type is 'chosen' by the
code using the API and type members where the type is 'chosen' by the
implementation code. Of course, there are exceptions to every rule, but
it's a good enough first guess most of the time.

Matthew




&lt;/pre&gt;</description>
    <dc:creator>Matthew Pocock</dc:creator>
    <dc:date>2012-05-24T18:34:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53564">
    <title>Re: Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53564</link>
    <description>&lt;pre&gt;
Take

     val e = reify { someComplexExpression }

What  want is a printReallyRaw(e) giving me some output that I could 
paste into a source file so that

    (e == &amp;lt;pasted code&amp;gt;) &amp;amp;&amp;amp; (e match { case &amp;lt;pasted code&amp;gt; =&amp;gt; true })

-sz

&lt;/pre&gt;</description>
    <dc:creator>Stefan Zeiger</dc:creator>
    <dc:date>2012-05-24T18:22:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53563">
    <title>Re: Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53563</link>
    <description>&lt;pre&gt;I can't speak for Stefan, clearly, but for my part I'm writing a new version of ScalaMock. As discussed in an earlier thread, I can't use reify to do this, so I'm having to write trees out explicitly.

The way that I'm working out how these trees should be structured is by using reify on an example of the kind of code I want to generate, and then passing the result of that to showRaw. This gives me an example of a specific tree, which I can generalise.

Make sense? 

--
paul.butcher-&amp;gt;msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: paul-q9qwgYRQEc9WkMItezQGDw&amp;lt; at &amp;gt;public.gmane.org
AIM: paulrabutcher
Skype: paulrabutcher


On Thursday, 24 May 2012 at 18:58, Eugene Burmako wrote:


&lt;/pre&gt;</description>
    <dc:creator>Paul Butcher</dc:creator>
    <dc:date>2012-05-24T18:07:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53562">
    <title>Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53562</link>
    <description>&lt;pre&gt;Could you be more specific about what you want to get from what?

On May 24, 6:20 pm, Stefan Zeiger &amp;lt;szei...-QayF08W3+w1Wk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eugene Burmako</dc:creator>
    <dc:date>2012-05-24T17:58:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53561">
    <title>Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53561</link>
    <description>&lt;pre&gt;Thank you very much, Jan!
Your code is very elegant.
I will try to apply your idea to my project.

Eugen

On 2012-05-24 19:16, Jan Vanek wrote:


&lt;/pre&gt;</description>
    <dc:creator>Eugen Labun</dc:creator>
    <dc:date>2012-05-24T17:33:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53560">
    <title>Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53560</link>
    <description>&lt;pre&gt;Hi Eugen, I tried to model it as a domain with an abstract value:

object Test {
     trait Domain {
         type Value &amp;lt;: Val

         trait Expr { def eval: Value }

         trait Val extends Expr { this: Value =&amp;gt; def eval = this }

         trait Op extends Expr
     }

     object IntDomain extends Domain {
         trait Expr extends super.Expr {
             def add(other: Expr) = Add(this, other)

             def neg = Neg(this)
         }

         case class Value(v: Int) extends Expr with Val
         implicit def value(v: Int) = Value(v)

         case class Add(left: Expr, right: Expr) extends Expr with Op {
             def eval = left.eval.v + right.eval.v
         }

         case class Neg(expr: Expr) extends Expr with Op {
             def eval = -expr.eval.v
         }
     }

     def main(args: Array[String]) {
         import IntDomain._
         val expr = (1 add 2) neg

         println(expr)
         println(expr.eval.v)
     }
}

I happened to have a little time, perhaps it can be usable.
Regards,
Jan


&lt;/pre&gt;</description>
    <dc:creator>Jan Vanek</dc:creator>
    <dc:date>2012-05-24T17:16:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53559">
    <title>Re: Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53559</link>
    <description>&lt;pre&gt;
BTW, is there any way to print a constructor/extractor for a tree 
without any simplifications? That would help with writing patterns for 
matching tree shapes if you have examples of such trees.

-sz

&lt;/pre&gt;</description>
    <dc:creator>Stefan Zeiger</dc:creator>
    <dc:date>2012-05-24T16:20:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53558">
    <title>Re: Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53558</link>
    <description>&lt;pre&gt;
Thank you, again, Peter. This works in the simple example. I have to rewrite this yet for the real 
hierarchy of nodes. In reality there is an Op that has a parameter that evaluates to a Value that 
holds the map. Thus that Value have to be parameterized everywhere, too... What in turn would 
probably require passing of the parameter of the type parameter everywhere, too... (cyclic, as you 
say below)


Yeah, those cyclic dependencies are tricky (and ugly).

You mean 'usual': without the type parameters? I have had that before and was hoping to be able to 
create "typechecked" nodes (like IntAdd), so that the building of the whole tree is typesafe (IntAdd 
can be created only with parameters that evaluate to IntValues) and the evaluation is as simple as 
an `eval` call on the root node.

I was also thinking about from the viewpoint of the composite pattern. What I'm trying to achieve is 
a common supertype T for leaves + parameterizing of all nodes with a subtype of T. Yet couldn't find 
any implementation example for that.

The overall design (as in the posted code examples) is working for me in most situations. The only 
issue arised in this one case with "mapping a map". I suppose this could be not the last one though.



What would it look like in the code? Could you please explain a little?


Eugen

&lt;/pre&gt;</description>
    <dc:creator>Eugen Labun</dc:creator>
    <dc:date>2012-05-24T15:15:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53557">
    <title>Re: converting type parameters (with self types) to abstract type members</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53557</link>
    <description>&lt;pre&gt;On Thu, May 24, 2012 at 4:24 PM, Robbert van Dalen &amp;lt;
robbert.van.dalen-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


It is possible that the compiler has (or will have) some internal unifying
representation but I don't know the details.



They are sometimes less verbose for the "inside" of the code, I'd say. But
for example it would not be a good idea to have e.g. scala's List or Map to
have the element type (or key/value types) as abstract members because each
time when you use it you'd have to write code like List { type Value =
String } instead of List[String]. It's individual for each case. I don't
have the proper words to describe when is which one more suitable, though.
IMO you don't have to pick/prefer one, both are your friends.

HTH,
Jan


&lt;/pre&gt;</description>
    <dc:creator>Jan Vanek</dc:creator>
    <dc:date>2012-05-24T15:08:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53556">
    <title>Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53556</link>
    <description>&lt;pre&gt;Hi Eugen,

so even better:

def process[T &amp;lt;: Value[_]](m: Map[String,T]): Map[String,T] =
  m map {t =&amp;gt; rename(t._1) -&amp;gt; t._2 }

Apart from this, I think you better stick with 'usual' algebraic
types. For instance, it's much simpler if  your algebraic type has a
root trait without cyclic type parameters.

Also, we could think of the '&amp;lt;: Value[_]' constraints as a client side
concern allowing us to eliminate it from your AST-design and packing
it into an intermediate object instead. What do you think?

Peter

&lt;/pre&gt;</description>
    <dc:creator>Sonnenschein</dc:creator>
    <dc:date>2012-05-24T14:19:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53555">
    <title>Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53555</link>
    <description>&lt;pre&gt;All right, what your problem is really about is symbols.

When you deal with identifies in Scala, there are two equivalent ways
to represent them. First, you painstakingly write
`Select(Select(Select(..., newXXXName("")), newXXXName("")),
newXXXName(""))` to provide a full path to the identifier. Second, you
play smart - resolve a symbol and attach it to a bare ident, like
that: `Ident(ListClass)`.

The `Ident(newTypeName("HashMap"))` printout you're getting means that
there's a `class blah.blah.blah.HashMap` symbol underlying this
`Ident`. Current implementation of `showRaw` just prints its short
name, but, most likely, we can adjust it to print the full name. I'll
see to it, when we're done with reflection. Speaking of `show`, I'm
not sure whether it makes sense to always print full names, though.

On May 24, 12:27 am, Paul Butcher &amp;lt;p...-q9qwgYRQEc9WkMItezQGDw&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eugene Burmako</dc:creator>
    <dc:date>2012-05-24T13:54:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53554">
    <title>Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53554</link>
    <description>&lt;pre&gt;Doh, that's completely unrelated. Disregard my previous message,
please.

On May 24, 3:39 pm, Eugene Burmako &amp;lt;xeno...-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eugene Burmako</dc:creator>
    <dc:date>2012-05-24T13:39:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53553">
    <title>Re: Macros - confusing results from show/showRaw</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53553</link>
    <description>&lt;pre&gt;Yeah, that's a bug, and, in fact, I've stumbled upon it yesterday and
fixed it in topic/reflection.

Why does this happen? Currently I don't have a full-fledged
NodePrinter for reified stuff, so I do toString and then do a series
of String.replace. Ugly, yes, but with the rate of changes to
reification, I believe, that's the best approach.

The problem stems from the fact that one of these `replace` calls
replaces all scala.collection.immutable with an empty string to
suppress ugly `scala.collection.immutable.List` stuff. This has a
refreshing effect on eyes, but, unfortunately, it also deletes useful
info from inside strings.

On May 24, 12:27 am, Paul Butcher &amp;lt;p...-q9qwgYRQEc9WkMItezQGDw&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Eugene Burmako</dc:creator>
    <dc:date>2012-05-24T13:39:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53552">
    <title>Re: Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53552</link>
    <description>&lt;pre&gt;
Oh, sorry. It seems that in the definition above all values in the map have to be parameterized with 
the same `T`. In my usecase there can be different types:

scala&amp;gt; :paste
// Entering paste mode (ctrl-D to finish)

   sealed abstract class Expr[T &amp;lt;: Value[_]] {def eval: T}

   sealed abstract class Value[T &amp;lt;: Value[_]] extends Expr[T] {def eval = this.asInstanceOf[T]}
   case class IntVal(v: Int) extends Value[IntVal]
   case class BooleanVal(v: Boolean) extends Value[BooleanVal]

   sealed abstract class Op[T &amp;lt;: Value[_]] extends Expr[T]
   case class IntAdd(e1: Expr[IntVal], e2: Expr[IntVal]) extends Op[IntVal] {def eval = 
IntVal(e1.eval.v + e2.eval.v)}

   def rename(s: String): String = "xxx"

   // def process(m: Map[String, Value[_]]): Map[String, Value[_]] = m map {t =&amp;gt; (rename(t._1), t._2)}

   def process[T &amp;lt;: Value[_]](m: Map[String, Value[T]]): Map[String,Value[T]] = m map {t =&amp;gt; 
rename(t._1) -&amp;gt; t._2 }

   process(Map("a" -&amp;gt; IntVal(5), "b" -&amp;gt; IntAdd(IntVal(2), IntVal(3)).eval))

   process(Map("a" -&amp;gt; IntVal(5), "b" -&amp;gt; IntAdd(IntVal(2), IntVal(3)).eval, "c" -&amp;gt; BooleanVal(true)))

// Exiting paste mode, now interpreting.

&amp;lt;console&amp;gt;:35: error: no type parameters for method process: (m: 
Map[String,Value[T]])Map[String,Value[T]] exist so that it can be applied to arguments (scala.co
llection.immutable.Map[java.lang.String,Product with Value[_ &amp;gt;: BooleanVal with IntVal &amp;lt;: Product 
with Value[_ &amp;gt;: BooleanVal with IntVal &amp;lt;: Product with Seriali
zable] with Serializable] with Serializable])
  --- because ---
argument expression's type is not compatible with formal parameter type;
  found   : scala.collection.immutable.Map[java.lang.String,Product with Value[_ &amp;gt;: BooleanVal with 
IntVal &amp;lt;: Product with Value[_ &amp;gt;: BooleanVal with IntVal &amp;lt;: P
roduct with Serializable] with Serializable] with Serializable]
  required: Map[String,Value[?T]]
                 process(Map("a" -&amp;gt; IntVal(5), "b" -&amp;gt; IntAdd(IntVal(2), IntVal(3)).eval, "c" -&amp;gt; 
BooleanVal(true)))
                 ^


&lt;/pre&gt;</description>
    <dc:creator>Eugen Labun</dc:creator>
    <dc:date>2012-05-24T12:26:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53551">
    <title>Re: Using infix Ordering ops on String</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53551</link>
    <description>&lt;pre&gt;
Could you please raise a bug on IntelliJ for that difference?

You could run scala -Xprint:typer ' ....; "a".min(null)' to see which
implicit kicks in. But it's a good idea to have an idea what implicits
are defined in Predef.

I would prefer Predef.augmentString and Predef.wrapString were was
moved into a (fictional) companion object for j.l.String, which would
mean they would only be used as a last resort.

-jason

&lt;/pre&gt;</description>
    <dc:creator>Jason Zaugg</dc:creator>
    <dc:date>2012-05-24T12:19:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53550">
    <title>Re: Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53550</link>
    <description>&lt;pre&gt;
Thank you, Peter! This works.
It seems that that `T&amp;lt;: Value[_]` should be passed through the whole tree...

&lt;/pre&gt;</description>
    <dc:creator>Eugen Labun</dc:creator>
    <dc:date>2012-05-24T11:59:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53549">
    <title>Re: Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53549</link>
    <description>&lt;pre&gt;Maybe you can go with

def process[T &amp;lt;: Value[_]](m: Map[String, Value[T]]): Map[String,
Value[T]] =
  m map {t =&amp;gt; rename(t._1) -&amp;gt; t._2 }

Peter

&lt;/pre&gt;</description>
    <dc:creator>Sonnenschein</dc:creator>
    <dc:date>2012-05-24T11:48:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53548">
    <title>RE: Using infix Ordering ops on String</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53548</link>
    <description>&lt;pre&gt;
OK, I understand the problem. I still don't understand the error - how did you decipher it? IDEA jumps me (if I click on "min") to the Ordering#Ops definition; no indication of ambiguity at all
Chris

       &lt;/pre&gt;</description>
    <dc:creator>Chris Marshall</dc:creator>
    <dc:date>2012-05-24T11:43:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53547">
    <title>Re: Using infix Ordering ops on String</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53547</link>
    <description>&lt;pre&gt;
Duelling implicits:

scala&amp;gt; augmentString("a").min
res0: Char = a

scala&amp;gt; import math.Ordering.Implicits._
import math.Ordering.Implicits._

scala&amp;gt; infixOrderingOps("a").min("b")
res1: java.lang.String = a

-jason

&lt;/pre&gt;</description>
    <dc:creator>Jason Zaugg</dc:creator>
    <dc:date>2012-05-24T11:27:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.scala.user/53546">
    <title>Mapping a Map: type mismatch error (AST modelling)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.scala.user/53546</link>
    <description>&lt;pre&gt;Dear all,

I'm trying to model the following AST:
An expression is either an operation or a value. An operation is reducible to a value via `eval` 
method. Concrete operations have expressions as parameters. It should be possible to restrict those 
parameters to expressions that evaluate to some concrete types of values.

The problem: a method that processes a map[String, Value] doesn't compile (Scala 2.9.2):

scala&amp;gt; :paste
// Entering paste mode (ctrl-D to finish)

   sealed abstract class Expr[T &amp;lt;: Value[_]] {def eval: T}
   sealed abstract class Op[T &amp;lt;: Value[_]] extends Expr[T]
   sealed abstract class Value[T &amp;lt;: Value[_]] extends Expr[T] {def eval = this.asInstanceOf[T]}

   def rename(s: String): String = "xxx"
   def process(m: Map[String, Value[_]]): Map[String, Value[_]] = m map {t =&amp;gt; (rename(t._1), t._2)}

// Exiting paste mode, now interpreting.

&amp;lt;console&amp;gt;:12: error: type mismatch;
  found   : scala.collection.immutable.Iterable[(java.lang.String, Value[_$4]) forSome { type _$4 }]
  required: Map[String,Value[_]]
          def process(m: Map[String, Value[_]]): Map[String, Value[_]] = m map {t =&amp;gt; (rename(t._1), 
t._2)}
                                                                           ^


Can you help me to solve this riddle? Perhaps, a better definition for Expr-Op-Value hierarchy?


Thank you,
Eugen

&lt;/pre&gt;</description>
    <dc:creator>Eugen Labun</dc:creator>
    <dc:date>2012-05-24T11:21:30</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.scala.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.scala.user</link>
  </textinput>
</rdf:RDF>

