This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import magnolia.{CaseClass, Magnolia, SealedTrait} | |
import org.specs2.matcher.describe._ | |
import scala.language.experimental.macros | |
object DiffableDerivation { | |
/** binds the Magnolia macro to this derivation object */ | |
implicit def genDiffable[T]: Diffable[T] = macro Magnolia.gen[T] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val config = com.typesafe.config.ConfigFactory.parseString(""" | |
| a.b.c = 42 | |
| d.e.f = hello world | |
| g.h.i = 2m | |
| """) | |
config: com.typesafe.config.Config = Config(SimpleConfigObject({"a":{"b":{"c":42}},"d":{"e":{"f":"hello world"}},"g":{"h":{"i":"2m"}}})) | |
scala> val Alpha = Setting[Int]("a.b.c") | |
Alpha: commands.common.SimpleSetting[Int] = a.b.c |