Created
November 3, 2015 19:20
-
-
Save nrinaudo/e7f21fcd8f72736ceee6 to your computer and use it in GitHub Desktop.
Demonstration of my issues with export-hook
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
resolvers ++= Seq( | |
Resolver.sonatypeRepo("releases"), | |
Resolver.sonatypeRepo("snapshots") | |
) | |
scalaVersion := "2.11.7" | |
libraryDependencies ++= Seq( | |
"org.typelevel" %% "export-hook" % "1.0.2", | |
compilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross CrossVersion.full) | |
) |
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 export._ | |
trait Encoder[T] { | |
// Type class defns ... | |
} | |
object Encoder extends EncoderLowPriority { | |
// Instances which should be higher priority than derived | |
// or subclass instances should be defined here ... | |
} | |
// Derived, subclass and other instances of Encoder are automatically included here ... | |
@imports[Encoder] | |
trait EncoderLowPriority { | |
// Instances which should be lower priority than imported | |
// instances should be defined here ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment