Guest User

Untitled

a guest
Jun 5th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. // generated using a simple showTree macro:
  2.  
  3. parameter("name") // expands to:
  4.  
  5. parameters(directives.this.ParamDefMagnet.apply[String]("name")(directives.this.ParamDefMagnet2.forString(unmarshalling.this.Deserializer.liftToSourceOption[String, String](unmarshalling.this.Deserializer.fromFunction2Converter[String, String](scala.this.Predef.$conforms[String])))))
  6.  
  7. parameter("name", "address") // expands to (shapeless 1):
  8.  
  9. parameters(directives.this.ParamDefMagnet.apply[(String, String)](scala.Tuple2.apply[String, String]("name", "address"))(directives.this.ParamDefMagnet2.forTuple[(String, String), shapeless.::[String,shapeless.::[String,shapeless.HNil]], this.Out](shapeless.this.HListerAux.tupleHLister2[String, String], directives.this.ParamDefMagnet2.forHList[shapeless.::[String,shapeless.::[String,shapeless.HNil]]](shapeless.this.LeftFolder.leftFolder[shapeless.::[String,shapeless.::[String,shapeless.HNil]], spray.routing.Directive0, spray.routing.directives.ParamDefMagnet2.MapReduce.type, this.R](shapeless.this.LeftFolderAux.hlistLeftFolderAux[String, shapeless.::[String,shapeless.HNil], spray.routing.Directive0, spray.routing.directives.ParamDefMagnet2.MapReduce.type, this.R, this.R](ParamDefMagnet2.this.MapReduce.from[String, shapeless.HNil, shapeless.::[String,shapeless.HNil], shapeless.::[String,shapeless.HNil]](directives.this.ParamDefMagnet2.forString(unmarshalling.this.Deserializer.liftToSourceOption[String, String](unmarshalling.this.Deserializer.fromFunction2Converter[String, String](scala.this.Predef.$conforms[String]))), shapeless.this.PrependAux.hnilPrepend[shapeless.::[String,shapeless.HNil]]), shapeless.this.LeftFolderAux.hlistLeftFolderAux[String, shapeless.HNil, this.R, spray.routing.directives.ParamDefMagnet2.MapReduce.type, this.R, this.R](ParamDefMagnet2.this.MapReduce.from[String, shapeless.::[String,shapeless.HNil], shapeless.::[String,shapeless.HNil], shapeless.::[String,shapeless.::[String,shapeless.HNil]]](directives.this.ParamDefMagnet2.forString(unmarshalling.this.Deserializer.liftToSourceOption[String, String](unmarshalling.this.Deserializer.fromFunction2Converter[String, String](scala.this.Predef.$conforms[String]))), shapeless.this.PrependAux.hlistPrepend[String, shapeless.HNil, shapeless.::[String,shapeless.HNil], shapeless.::[String,shapeless.HNil]](shapeless.this.PrependAux.hnilPrepend[shapeless.::[String,shapeless.HNil]])), shapeless.this.LeftFolderAux.hnilLeftFolderAux[this.R, spray.routing.directives.ParamDefMagnet2.MapReduce.type])))))))
  10.  
  11. // the same with shapeless 2:
  12.  
  13. parameters(directives.this.ParamDefMagnet.apply[(String, String)](scala.Tuple2.apply[String, String]("name", "address"))(directives.this.ParamDefMagnet2.forHList[(String, String), this.Repr]({
  14. final class fresh$macro$359 extends AnyRef with shapeless.Generic[(String, String)] {
  15. def <init>(): fresh$macro$359 = {
  16. fresh$macro$359.super.<init>();
  17. ()
  18. };
  19. type Repr = shapeless.::[String,shapeless.::[String,shapeless.HNil]];
  20. def to(p: (String, String)): fresh$macro$359.this.Repr = p match {
  21. case (_1: String, _2: String)(String, String)((pat$macro$357 @ _), (pat$macro$358 @ _)) => shapeless.::.apply[String, shapeless.::[String,shapeless.HNil.type]](pat$macro$357, shapeless.::.apply[String, shapeless.HNil.type](pat$macro$358, shapeless.HNil))
  22. };
  23. def from(p: fresh$macro$359.this.Repr): (String, String) = p match {
  24. case (head: String, tail: shapeless.::[String,shapeless.HNil])shapeless.::[String,shapeless.::[String,shapeless.HNil]]((pat$macro$357 @ _), (head: String, tail: shapeless.HNil)shapeless.::[String,shapeless.HNil]((pat$macro$358 @ _), shapeless.HNil)) => scala.this.Tuple2.apply[String, String](pat$macro$357, pat$macro$358)
  25. }
  26. };
  27. new fresh$macro$359()
  28. }, hlist.this.LeftFolder.hlistLeftFolder[String, shapeless.::[String,shapeless.HNil], spray.routing.Directive0, spray.routing.directives.ParamDefMagnet2.MapReduce.type, this.Result](directives.this.ParamDefMagnet2.MapReduce.from[String, shapeless.HNil, shapeless.::[String,shapeless.HNil], shapeless.::[String,shapeless.HNil]](directives.this.ParamDefMagnet2.forString(unmarshalling.this.Deserializer.liftToSourceOption[String, String](unmarshalling.this.Deserializer.fromFunction2Converter[String, String](scala.this.Predef.$conforms[String]))), hlist.this.Prepend.hnilPrepend1[shapeless.HNil, shapeless.::[String,shapeless.HNil]]), hlist.this.LeftFolder.hlistLeftFolder[String, shapeless.HNil, this.Result, spray.routing.directives.ParamDefMagnet2.MapReduce.type, this.Result](directives.this.ParamDefMagnet2.MapReduce.from[String, shapeless.::[String,shapeless.HNil], shapeless.::[String,shapeless.HNil], this.Out](directives.this.ParamDefMagnet2.forString(unmarshalling.this.Deserializer.liftToSourceOption[String, String](unmarshalling.this.Deserializer.fromFunction2Converter[String, String](scala.this.Predef.$conforms[String]))), hlist.this.Prepend.hlistPrepend[String, shapeless.HNil, shapeless.::[String,shapeless.HNil]](hlist.this.Prepend.hnilPrepend1[shapeless.HNil, shapeless.::[String,shapeless.HNil]])), hlist.this.LeftFolder.hnilLeftFolder[this.Result, spray.routing.directives.ParamDefMagnet2.MapReduce.type])))))
Advertisement
Add Comment
Please, Sign In to add comment