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

Added EmptyK instance for Map #3677

Merged
merged 1 commit into from
Dec 19, 2020
Merged

Added EmptyK instance for Map #3677

merged 1 commit into from
Dec 19, 2020

Conversation

LMnet
Copy link
Contributor

@LMnet LMnet commented Nov 11, 2020

I added the missing EmptyK instance for a Map.

Also, I made the Empty.fromEmptyK function implicit. I don't know why it was not marked as implicit, and it looks like it is a pretty safe change. This change automatically added an Empty instance for a Map too.

@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

Merging #3677 (b47d0a3) into master (098305f) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #3677      +/-   ##
==========================================
- Coverage   90.24%   90.21%   -0.04%     
==========================================
  Files         391      391              
  Lines        8866     8869       +3     
  Branches      251      252       +1     
==========================================
  Hits         8001     8001              
- Misses        865      868       +3     

@larsrh
Copy link
Contributor

larsrh commented Dec 19, 2020

Thanks!

@larsrh larsrh merged commit 1460601 into typelevel:master Dec 19, 2020
@LMnet LMnet deleted the emptyk-map branch December 20, 2020 04:34
@@ -21,7 +21,7 @@ object Empty extends EmptyInstances0 {
def apply[A](a: => A): Empty[A] =
new Empty[A] { lazy val empty: A = a }

def fromEmptyK[F[_], T](implicit ekf: EmptyK[F]): Empty[F[T]] = ekf.synthesize[T]
implicit def fromEmptyK[F[_], T](implicit ekf: EmptyK[F]): Empty[F[T]] = ekf.synthesize[T]
Copy link
Member

Choose a reason for hiding this comment

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

Looks like kittens can't handle this: typelevel/kittens#299

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.

4 participants