-
Notifications
You must be signed in to change notification settings - Fork 0
/
DerivationsNoOrphans.scala
45 lines (35 loc) · 1.05 KB
/
DerivationsNoOrphans.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* All of these are ok
object DirectNoOrphans {
import argonaut._
import GenDecodeJsons.DecodeJsonDeriver._
DecodeJson.of[CC]
DecodeJson.of[CC2]
}
object DirectCachedNoOrphans {
import argonaut._
import GenDecodeJsons.DecodeJsonDeriver._
implicit val ccDecodeJson = DecodeJson.of[CC]
implicit val cc2DecodeJson = DecodeJson.of[CC2]
}
object DirectCachedImplicitlyNoOrphans {
import argonaut._
import GenDecodeJsons.DecodeJsonDeriver._
implicit val ccDecodeJson = implicitly[DecodeJson[CC]]
implicit val cc2DecodeJson = implicitly[DecodeJson[CC2]]
}
*/
object DirectCachedTheNoOrphans {
import shapeless._
import argonaut._
import GenDecodeJsons.DecodeJsonDeriver._
implicit val ccDecodeJson = the[DecodeJson[CC]]
implicit val cc2DecodeJson = the[DecodeJson[CC2]]
}
object CachedNoOrphans {
import shapeless._
import argonaut._
import GenDecodeJsons.DecodeJsonDeriver._
implicit val ccDecodeJson: DecodeJson[CC] = cachedImplicit
implicit val cc2DecodeJson: DecodeJson[CC2] = cachedImplicit
}