[Haskell-cafe] Building PanDoc for iOS target, but failed in Haskell Template requirement by 'aeson' package

Joe joe at interare.com
Wed Dec 25 06:56:12 UTC 2013

Hi Carter,

Thanks for your fasttt response. After patching Aeson to remove TH module, I've been successfully build all dependencies and today finally succeeded statically linked simple Haskell app that calls PanDoc library to iOS application. 

I haven't tested too much, but I'm concerned that the resulting binary file is more than 50mb. For comparison, a simple Haskell app linked to iOS app will generate 5mb binary.

Is there anyway to make it smaller such as stripping the binaries?

Thanks so much and merry Christmas to everyone here :).


Plan it, Do it, Let it GO :)

> On 23 Des 2013, at 21.38, Carter Schonwald <carter.schonwald at gmail.com> wrote:
> Patch Aeson locally so that it has no th module.  Then fix any transitive breakages as you hit them.  
> General th support for cross compiling ghc is on the roadmap for getting worked out in ghc, but it's really just part of generally improving ghc so that there can be multi target cross compilation support.  This is because th will run on your dev Mac, but me generating code for your iOS device! 
> Ghcjs actuall has such cross compilation, so some ideas could be borrowed from there. 
> Hopefully it'll happen in the next year, though when and by whom is still a bit unclear.  
>> On Monday, December 23, 2013, Joe wrote:
>> Hi, I've been trying to cross-compile PanDoc for iOS target for the last few days. I have been quite successfull from building stage-1 GHC for iOS target and many packages dependencies required by PanDoc until I see that 'aeson' package require Haskell Template which is not supported in cross compilation.
>> As pointed in iOS CrossCompiling Wiki page, it seems that Template Haskell doesn't work yet and still in wish list.
>> Is there any hack or workaround to be able to cross-compile 'aeson' package for iOS target? Can I compile 'aeson' without Haskell Template? Anybody know when Template Haskell in CrossCompiling for iOS will be added?
>> Thanks a lot!
>> Best regards,
>> Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131225/1196b97d/attachment.html>

More information about the Haskell-Cafe mailing list