Woah! Jumping into cross compiling as your way to start learning Haskell? That's pretty awesome.   Please continue to share any problems you may have, it's always possible that it could be a bug!<span></span><br><br>
On Wednesday, December 25, 2013, Joe  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Carter,</div><div><br></div><div>
Sure! Just added new <a href="https://ghc.haskell.org/trac/ghc/ticket/8629" target="_blank">ticket #8629</a>.</div><div><br></div><div>As for inlining, I think i’ll start learning haskell first before jumping into modifying the code :). Hopefully either split-objs, executable or other some other idea to reduce binary size could be found very soon.</div>
<div><br></div><div>Thanks for helping.</div><div><br></div><div>Best regards,</div><div>Joe</div><br><div><div>On Dec 25, 2013, at 10:14 PM, Carter Schonwald <<a href="javascript:_e({}, 'cvml', 'carter.schonwald@gmail.com');" target="_blank">carter.schonwald@gmail.com</a>> wrote:</div>
<br><blockquote type="cite">Huh.  Could you write up a ticket on trac?  This could be considered a bug in cross compilation.  Explain that you're trying to make sure the object code for iOS is small.  <div><br></div><div>
@luke, are there any tricks for managing object size you've done<br>
<div><br></div>There are some ideas to reduce object size for ghc 7.10, but that doesn't help you write now.  </div><div><br></div><div><br></div><div>@Joe: one idea could be to mess with the ghc flags that relate to Inlining.  Reducing the amount of Inlining may help with object size, BUT may make things slower.  I don't recall what the relevant ghc flags are off hand. You'd have to do some digging. <span></span></div>

<div><br></div><div><br><div><br>On Wednesday, December 25, 2013, Joe  wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>
Hi Carter,</div><div><br></div><div>When I have added “split-objs: True” in .cabal/config file, but when running cabal I got this message:</div><div><br></div><div><div style="margin:0px;font-size:14px;font-family:Menlo">

<div style="margin:0px"><div style="margin:0px"><font color="#e63b7a">Preprocessing library pandoc-1.12.2.1...</font></div><div style="margin:0px"><font color="#e63b7a">unused terminals: 1</font></div><div style="margin:0px;min-height:16px">

<font color="#e63b7a"><br></font></div><div style="margin:0px"><font color="#e63b7a">on the commandline: Warning: ignoring -fsplit-objs</font></div><div><br></div></div></div></div><div>And if I ignore that, at the end of build, I get another error message that stop the build.</div>

<div><br></div><div><div style="margin:0px;font-size:14px;font-family:Menlo"><font color="#e63b7a">cabal: dist-i386/build/Text/Pandoc_o_split: does not exist</font></div></div><div><br></div><div>It seems that split-objs cannot work with cross-compilation ghc.</div>

<div><br></div><div>What do you think?</div><div><br></div><div>Best regards,</div><div>Joe</div><br><div><div>On Dec 25, 2013, at 8:46 PM, Carter Schonwald <<a>carter.schonwald@gmail.com</a>> wrote:</div>
<br><blockquote type="cite">You need to make sure every lib is built with split objs, not just the final application.  Did you try it that way?   You could also try to limit the amount of Inlining in your application too<span></span><br>

<br>On Wednesday, December 25, 2013, Joe  wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>
I’m asking similar question on haskell-cafe group, but I think it’s more appropriate to ask here since it’s iPhone related. Please forgive my double post.</div>

<div><br></div><div>I have been trying to statically link Pandoc packages to iOS application and I want to say that what have been done so far as explained in <a href="https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS</a> is great! I have finally successfully use Pandoc library in iOS app, but there’s an issue that the final app binary is <b>more than 50MB</b> when using Pandoc library. It’s around 5MB for simple haskell library. And without using Haskell, it’s around 100kb.</div>


<div><br></div><div>Is it possible to strip the executable binary? I read that stripping is not possible using xcode strip. I also try to add -split-objs flag, but it’s not working either.</div><div><br></div><div>Any idea? Is this a known issue?</div>


<div><br></div><div>Thanks for making Haskell work on iOS!</div><div><br></div><div>Best regards and merry christmas,</div><div>Joe</div></div></blockquote>
</blockquote></div><br></div></blockquote></div></div>
</blockquote></div><br></div></blockquote>