-
-
Save travisbrown/4722927 to your computer and use it in GitHub Desktop.
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> def foo[A, B, C](a: SNat[A], b: SNat[B], c: SNat[C])(implicit ssum: SSum[A, B, C]) = ssum | |
foo: [A, B, C](a: shapeless.SNat[A], b: shapeless.SNat[B], c: shapeless.SNat[C])(implicit ssum: shapeless.SSum[A,B,C])shapeless.SSum[A,B,C] | |
scala> foo(2, 3, 5) | |
res0: shapeless.SSum[Int(2),Int(3),Int(5)] = $anon$1@53d76e96 | |
scala> foo(2, 3, 7) | |
<console>:15: error: could not find implicit value for parameter ssum: shapeless.SSum[Int(2),Int(3),Int(7)] | |
foo(2, 3, 7) | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment