Conversation
|
I don't know how to set up ormolu for formatting, and I don't really have time to futz with that right now. Can someone help me out? |
|
@aspiwack aside from the formatting thing, I think this is pretty much ready. It doesn't remove all the orphans, but that can be done in another PR or two. |
You should be able to format with |
|
If you have Nix installed, you can I pushed a formatting commit. @tbagrel1 This is a pretty big patch, please give it a review, I'll do the same myself. |
tbagrel1
left a comment
There was a problem hiding this comment.
Just a bit of nitpicking. Thank you really much for this impressive work!
aspiwack
left a comment
There was a problem hiding this comment.
(I've reviewed only about half way through, but I won't have time to resume for a while, so posting what I have)
|
@aspiwack Do you remember the motivations behind the difference of organisation between |
|
@aspiwack , you seem to be fighting a long term trend to prefer explicit and qualified imports to |
They are more robust, but in practice they cost more of my time. My inclination is to use qualified import as much as is reasonable (which will be easier when the Local Module proposal comes to fruition). But I prefer figuring out the occasional error, than preemptively making import list management something I have to care about on a daily basis. |
I think @Divesh-Otwani found it easier to document modules when they were split into smaller chunks for me. I don't care much either way as long as we have a reasonably small list of modules to import in the user-facing land. |
|
Note: when this is merged, it would be good to give @sjoerdvisscher credit for the substantial work he did on it before I showed up. As I recall, his most interesting contribution was generic derivation of control functors. I'm not sure how best to do that in the context of git with such a wild rebase. |
|
@aspiwack ormolu chokes doing something or other with dependencies ( |
|
The nix formatting approach fails for me too. |
I formatted it. I got no issues with |
|
Closes #316 . |
I believe that if you add the line To the relevant commits' messages, then Sjoerd will appear – at least in Github – as a coauthor of the commits. |
|
I think it's specifically at the end of the commit message. Github's documentation is here. |
aspiwack
left a comment
There was a problem hiding this comment.
There are only a few points to address to get this merged. @treeowl can you do that this week? If so we can include it in the next release.
I really like this. Thanks to both of you and @sjoerdvisscher for the great work that came into this.
| lcoerce :: forall a b. Coercible a b => a %1 -> b | ||
| lcoerce = coerce ((\x -> x) :: a %1 -> a) |
There was a problem hiding this comment.
Glad you like it ;-)
| -- @deriving via 'Generically'@. Note that at present this mechanism | ||
| -- can have performance problems for recursive parameterized types. | ||
| -- Specifically, the methods will not specialize to underlying 'Dupable' | ||
| -- instances. |
There was a problem hiding this comment.
I don't understand the performance problem that you are pointing at?
There was a problem hiding this comment.
@aspiwack, the underlying Dupable dictionary ends up being a (static) argument to a recursive function that doesn't get an unfolding. So the underlying duplication function will never be inlined, no matter how small it is. Probably not the biggest problem for Dupable; probably a bigger problem for Traversable, where traverse won't specialize to a particular Applicative, let alone a particular function to traverse with. See https://gitlab.haskell.org/ghc/ghc/-/issues/21131
There was a problem hiding this comment.
I've linked to the GHC issue from the docs.
Co-authored-by: David Feuer <David.Feuer@gmail.com>
To avoid orphans, put the generic deriving machinery with the `Traversable` class.
- `Consumable`, `Dupable` and `Movable` uniformly implemented for tuples up to n=5 - Fix some names/imports according to the project conventions
|
I think everything's sorted now. |
|
(Unless I've broken some ormolu junk again, in which case I imagine you can fix it.) |
|
Thanks! I'm guessing the dance around |
Yes, partly to make it representation polymorphic to match what the GHC built-in version will do as closely as we can. The previous implementation had unsatisfiable' :: Bottom => aThis was used at type unsatisfiable' :: Bottom => (##) -> qwhere What's the rest of the dance for? The "obvious" thing is to give |
|
Yes, I'll try to do it tonight. Lots of things going on!
…On Tue, Mar 15, 2022, 2:09 PM Arnaud Spiwack ***@***.***> wrote:
Thanks @tbagrel1 <https://github.com/tbagrel1> for taking care of the
small issues. @treeowl <https://github.com/treeowl> do you have time to
address the couple of request for extra comments? In either case, I plan to
merge this tomorrow, and then we make a release 🙂 .
—
Reply to this email directly, view it on GitHub
<#394 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7P4SAUSJCZGO3JYWADVADG5VANCNFSM5PDJKA5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Rebase in progress of #316.