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
Warn against Data.Semigroup.Option and Data.Monoid.First/Last #128
Conversation
Is this finished? It looks like this only adds docs for |
Sorry, wasn't finished yet. I just pushed a warning about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording looks fine to me (with one small quibble).
libraries/base/Data/Monoid.hs
Outdated
-- | ||
-- In additional to being equivalent in the structural sense, the two | ||
-- also have 'Monoid' instances that behave the same. This type will | ||
-- be marked deprecated in GHC 8.8. It will be removed in GHC 8.10. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe shorten this to "be marked as deprecated in GHC 8.8, and removed in GHC 8.10".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Done.
I've made the suggested improvement to the wording. I've copied the warning to |
bump |
Works for me. |
Well, if it works for Ed it works for me. |
Merged. |
Binder multiplicities FloatOut pass
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
We don't need to do the callee save register dance. The compiler will do this for us already: 0000000000000000 <StgRun>: 0: a9b653f3 stp x19, x20, [sp, #-160]! 4: a9015bf5 stp x21, x22, [sp, #16] 8: a90263f7 stp x23, x24, [sp, #32] c: a9036bf9 stp x25, x26, [sp, #48] 10: a90473fb stp x27, x28, [sp, #64] 14: f9002bfe str x30, [sp, #80] 18: 6d0627e8 stp d8, d9, [sp, #96] 1c: 6d072fea stp d10, d11, [sp, #112] 20: 6d0837ec stp d12, d13, [sp, #128] 24: 6d093fee stp d14, d15, [sp, #144] 28: a9bf47f0 stp x16, x17, [sp, #-16]! 2c: d14013ff sub sp, sp, #0x4, lsl #12 30: aa0103f3 mov x19, x1 34: d61f0000 br x0 0000000000000038 <StgReturn>: 38: 914013ff add sp, sp, #0x4, lsl #12 3c: aa1603e0 mov x0, x22 40: a8c147f0 ldp x16, x17, [sp], #16 44: a9415bf5 ldp x21, x22, [sp, #16] 48: a94263f7 ldp x23, x24, [sp, #32] 4c: a9436bf9 ldp x25, x26, [sp, #48] 50: a94473fb ldp x27, x28, [sp, #64] 54: f9402bfe ldr x30, [sp, #80] 58: 6d4627e8 ldp d8, d9, [sp, #96] 5c: 6d472fea ldp d10, d11, [sp, #112] 60: 6d4837ec ldp d12, d13, [sp, #128] 64: 6d493fee ldp d14, d15, [sp, #144] 68: a8ca53f3 ldp x19, x20, [sp], #160 6c: d65f03c0 ret
This is phase 1 of https://ghc.haskell.org/trac/ghc/ticket/15028.
cc @ekmett @RyanGlScott