Skip to content

Instantly share code, notes, and snippets.

@nafg
Created January 31, 2014 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nafg/8729695 to your computer and use it in GitHub Desktop.
Save nafg/8729695 to your computer and use it in GitHub Desktop.
routing issue
// git clone git@github.com:nafg/reactive.git
// git checkout v0.4.0
// sbt routing/console
import reactive.routing._
implicit object IntArg extends Stringable[Int] { def format = _.toString; def parse = s => util.Try(s.toInt).toOption }
implicit object StringArg extends Stringable[String] { def format = identity; def parse = Option(_) }
val a = arg[Int] >> { i => i.toString }
val b = arg[String] >> { s => s }
(a & b) map identity
/*
error: could not find implicit value for parameter cmr: reactive.routing.CanLiftRouteMapping[reactive.routing.PArg[_ >: String with Int, reactive.routing.PNil]]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment