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

Add compatibility with KindedJ standard encoding #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jbgi
Copy link
Member

@jbgi jbgi commented Dec 24, 2017

Minor change to generated casting methods (to handle KindedJ encoding directly) but should be source compatible (tested on HighJ). Eg. for Either the generated code is now:

  @SuppressWarnings("unchecked")
  static <A, B> Either<A,B> asEither(Hk<? extends Hk<Either.µ,A>,B> hkt) {
    return (Either<A,B>) hkt;
  }

  @SuppressWarnings("unchecked") // unchanged
  static <A, B> TypeEq<__<__<Either.µ,A>,B>, Either<A,B>> either(){
    return (TypeEq) TypeEq.refl();
  }

jbgi added 2 commits December 13, 2017 18:06
Minor change to generated method but should be source compatible.
@jbgi jbgi requested a review from gneuvill December 25, 2017 16:47
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