Skip to content

Conversation

andyscott
Copy link
Member

@andyscott andyscott commented Jul 2, 2017

This is an early stage WIP for generic derivation using iota. For now, I'm able to get a type level representation of case classes.

case class Dummy(
  a: String,
  b: Double,
  c: Long)
 
val gen = TList.Gen[Dummy]

And here's the generated instance for gen:

[info]   final class $anon extends _root_.iota.TList.Gen[iotaexamples.Foo.Dummy] {
[info]     override type Repr = iota.TCons[String with iota.gen.Meta[Int(0), String("a")],iot
a.TCons[Double with iota.gen.Meta[Int(0), String("b")],iota.TCons[Long with iota.gen.Meta[Int
(0), String("c")],iota.TNil]]]                                                              
[info]   };
[info]   new $anon()
[info] }
[info]   val gen = TList.Gen[Dummy]

There's a lot more to do. And currently there is no way to map to a value level representation in an iota.Prod instance.

@andyscott andyscott changed the title WIP for generic derivation WIP for generic representations of ADTs Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants