-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Finishing up #1564 (add As a.k.a liskov) #1728
Conversation
This is a direct port of the Liskov class from scalaz. I named it `As` to be similar to our new `Is` class representing type equality, but there are aliases named `<~<` and `Liskov`
remove explicit reference to package in Is type alias (for posco) add === type alias for `Is` (for sellout)
- change unsafeFromPredef to just use refl - add tests for some expected relationships such as Int <~< Any, and List[String] <~< List[Any]
… derrived from what we have, and I can't find anyone using them in the wild)
Thank you very much @kailuowang for the solutiongit diff
Codecov Report
@@ Coverage Diff @@
## master #1728 +/- ##
==========================================
+ Coverage 93.9% 93.99% +0.08%
==========================================
Files 248 249 +1
Lines 4101 4129 +28
Branches 156 159 +3
==========================================
+ Hits 3851 3881 +30
+ Misses 250 248 -2
Continue to review full report at Codecov.
|
looks great! Thanks a ton @stew and @kailuowang (and prior scalaz authors). |
Can |
Can you describe what you mean in more detail?
Bounded how?
…On Wed, Jun 14, 2017 at 20:46 Alexander Konovalov ***@***.***> wrote:
Can Leibniz and Liskov type aliases be removed? I am not seeing the
rationale behind having extra symbolic type aliases. They could be used for
bounded versions of As and Is in the future.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1728 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEJdvbbV2bixq9hS8Pfx7EFNU2T3fOUks5sENNBgaJpZM4N3m_1>
.
|
Similar to https://github.com/alexknvl/leibniz/blob/master/src/main/scala/leibniz/Leibniz.scala |
I'm confused why you want such a thing rather than just several As
instances. Won't As[L, A], Is[A, B] and As[B, H] be the same as your
Leibniz?
…On Wed, Jun 14, 2017 at 20:49 Alexander Konovalov ***@***.***> wrote:
Similar to
https://github.com/alexknvl/leibniz/blob/master/src/main/scala/leibniz/Leibniz.scala
As it is Is[A, B] can not be used to substitute into bounded type
constructors such as F[A >: L <: H] even if you know that both A >: L <: H
and B >: L <: H.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1728 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEJdt62vYmoiovBBL9OU9b69taySYpnks5sENQVgaJpZM4N3m_1>
.
|
No. You can't get |
Having |
Similarly, having just |
This is an effort to finish up #1564
complete the missing test with 2 new helper methods for
Function1
Closes #1564