<div dir="ltr">Apologies, I should have used SHA references in the links:<div><br></div><div><div style="font-size:13px">> The code which seems to cause this is here:</div><div style="font-size:13px">> <a href="https://github.com/brendanhay/amazonka/blob/release/0.1.4/core/src/Network/AWS/Data/Internal/Text.hs#L51" target="_blank">https://github.com/brendanhay/amazonka/blob/release/0.1.4/core/src/Network/AWS/Data/Internal/Text.hs#L51</a></div><div style="font-size:13px"><br><span style="font-size:small"><a href="https://github.com/brendanhay/amazonka/blob/049fab83dd71e3f2e8aa5643902f95e83604db0c/core/src/Network/AWS/Data/Internal/Text.hs#L52" target="_blank">https://github.com/brendanhay/amazonka/blob/049fab83dd71e3f2e8aa5643902f95e83604db0c/core/src/Network/AWS/Data/Internal/Text.hs#L52</a></span><br></div><div style="font-size:13px"><span style="font-size:small"><br></span></div><div style="font-size:13px">> With the downstream project having about 68 call sites for the above function starting here:</div><div style="font-size:13px">> <a href="https://github.com/brendanhay/amazonka/blob/release/0.1.4/amazonka-ec2/gen/Network/AWS/EC2/Types.hs#L1465" target="_blank">https://github.com/brendanhay/amazonka/blob/release/0.1.4/amazonka-ec2/gen/Network/AWS/EC2/Types.hs#L1465</a></div></div><div style="font-size:13px"><br></div><div><a href="https://github.com/brendanhay/amazonka/blob/04f620d3e01a05c30db99afa07a84d07eee12434/amazonka-ec2/gen/Network/AWS/EC2/Types.hs#L1465" target="_blank">https://github.com/brendanhay/amazonka/blob/04f620d3e01a05c30db99afa07a84d07eee12434/amazonka-ec2/gen/Network/AWS/EC2/Types.hs#L1465</a><br></div><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On 6 January 2015 at 20:07, Brendan Hay <span dir="ltr"><<a href="mailto:brendan.g.hay@gmail.com" target="_blank">brendan.g.hay@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:13px">Hi,</div><div style="font-size:13px"><br></div><div style="font-size:13px">I've recently run into an issue whereby changing textual case comparison</div><div style="font-size:13px">to use the <a href="http://hackage.haskell.org/package/case-insensitive-1.2.0.3/docs/Data-CaseInsensitive.html" target="_blank">Data.CaseInsensitive.mk</a> smart constructor causes substantial</div><div style="font-size:13px">differences to outputted core language and a related compilation speed regression.</div><div style="font-size:13px"><br></div><div style="font-size:13px">The code which seems to cause this is here:</div><div style="font-size:13px"><a href="https://github.com/brendanhay/amazonka/blob/release/0.1.4/core/src/Network/AWS/Data/Internal/Text.hs#L51" target="_blank">https://github.com/brendanhay/amazonka/blob/release/0.1.4/core/src/Network/AWS/Data/Internal/Text.hs#L51</a></div><div style="font-size:13px"><br></div><div style="font-size:13px">With the downstream project having about 68 call sites for the above function starting here:</div><div style="font-size:13px"><a href="https://github.com/brendanhay/amazonka/blob/release/0.1.4/amazonka-ec2/gen/Network/AWS/EC2/Types.hs#L1465" target="_blank">https://github.com/brendanhay/amazonka/blob/release/0.1.4/amazonka-ec2/gen/Network/AWS/EC2/Types.hs#L1465</a></div><div style="font-size:13px"><br></div><div style="font-size:13px">For comparison, the previous version used <a href="http://hackage.haskell.org/package/attoparsec-0.12.1.2/docs/Data-Attoparsec-Text.html" target="_blank">Attoparsec.Text.takeText</a> and Text values.</div><div style="font-size:13px"><br></div><div style="font-size:13px">Here are some hand wavy points of interest:</div><div style="font-size:13px"><br></div><div style="font-size:13px">* Before (Case Sensitive)</div><div style="font-size:13px">Function: takeText = Attoparsec.Text.takeText</div><div style="font-size:13px">Time (real): 2m27.735s</div><div style="font-size:13px">amazonka-ec2/gen/Network/AWS/EC2/Types.hs (simpl): {terms: 242,688, types: 310,463, coercions: 31,215}</div><div style="font-size:13px"><br></div><div style="font-size:13px">* After (Case Insensitive)</div><div style="font-size:13px">Function: takeCI = <a href="http://Data.CaseInsensitive.mk" target="_blank">Data.CaseInsensitive.mk</a> <$> Attoparsec.Text.takeText</div><div style="font-size:13px">Time (real): 11m31.937s</div><div style="font-size:13px">amazonka-ec2/gen/Network/AWS/EC2/Types.hs (simpl): {terms: 1,384,779, types: 465,656, coercions: 33,510}</div><div style="font-size:13px"><br></div><div style="font-size:13px">I'm finding the outputted core rather unwieldy to analyse, but the main</div><div style="font-size:13px">difference seems to be the inclusion of huge swathes of case statements like:</div><div style="font-size:13px"><a href="https://gist.github.com/brendanhay/5a57f073d5a7d196a1ad" target="_blank">https://gist.github.com/brendanhay/5a57f073d5a7d196a1ad</a></div><div style="font-size:13px"><br></div><div style="font-size:13px">It would be appreciated if someone could help me to understand in simple terms why</div><div style="font-size:13px">the use of case-insensitive causes this.</div></div>
</blockquote></div><br></div></div>