Skip to content

Conversation

@pepegar
Copy link
Member

@pepegar pepegar commented Aug 7, 2018

@andyscott I'm not sure if I need to add something to the bazel build files, since I'm not an user of it

@pepegar pepegar requested a review from andyscott August 7, 2018 15:24
import scala.annotation.compileTimeOnly

@compileTimeOnly("enable macro paradise to expand macro annotations")
class fixie extends StaticAnnotation {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about renaming fixie to deriveFixedPoint?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! Now that it'll be part of droste, the old name doesn't make sense


val λ: TypeDef = q"type λ[α] = $NonRecursiveAdtName[..${clait.tparams.map(_.name)}, α]"

val functorInstance = q"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we provide a Traverse instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently kittens doesn't derive traverse. Only Functor and Foldable in that hierarchy

"org.typelevel" %%% "cats-core" % "1.1.0",
"org.typelevel" %%% "cats-free" % "1.1.0"))
"org.typelevel" %%% "cats-free" % "1.1.0",
"org.typelevel" %%% "kittens" % "1.1.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This brings in the kittens dependency. Long term we should see about removing this dependency and instead having macros to generate Functor/Traverse instances without Shapeless.

For now, can we split fixie into a separate module to better isolate the additional dependency? I need to keep the core module dependency free with the exception of the binary compat guaranteed cats modules.

For splitting, what do you think of droste-extras or another similar name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense. Maybe droste-macros makes more sense? We could put all our macros there and isolate the use of macro paradise.

@andyscott
Copy link
Member

Overall, looks good. My only blocking issue is dependency isolation-- see the note.

This opens the door to adding a few other nice macro helpers too :). Very exciting!

@pepegar pepegar changed the title migrate fixie macro to droste deriveFixedPoint macro annotation Aug 8, 2018
@pepegar
Copy link
Member Author

pepegar commented Aug 9, 2018

@andyscott shall we merge this now?

Copy link
Member

@andyscott andyscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one final tweak! After that, LGTM.

Ideally we squash and merge, or rebase to clean up the commit history (squashing/fixuping the "feedback" commits).

lazy val coreJVM = core.jvm
lazy val coreJS = core.js

lazy val macros = module("macros")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the macros project to the aggregate list at the top on the root project

@pepegar pepegar force-pushed the fixie-macro branch 3 times, most recently from 39d302c to edad885 Compare August 10, 2018 06:50
Copy link
Member

@andyscott andyscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andyscott andyscott merged commit a3e7396 into higherkindness:master Aug 10, 2018
@pepegar
Copy link
Member Author

pepegar commented Aug 10, 2018

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants