Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP for generic representations of ADTs #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.

None yet

2 participants