[Haskell-cafe] Haskell for Gingerbread

Henning Thielemann lemming at henning-thielemann.de
Thu Jan 13 18:34:24 CET 2011


John Meacham wrote:
> On Thu, Jan 13, 2011 at 3:07 AM, Stefan Kersten <sk at k-hornz.de> wrote:
>> On 28.12.10 21:25, John Meacham wrote:
>>> jhc generated C works on the android/ARM just fine. Android specific
>>> libraries arn't available, so you would have to bind to what you want
>>> with the FFI.
>> is there a recommended procedure for porting code from GHC to JHC? i'd like to
>> port an application of mine to ios/android, but my naive approach of specifying
>> the jhc compiler in ~/.cabal/config fails with the first dependency (binary),
>> because the base library does not have the required version. any hints?
> 
> In general cabal and jhc don't work together.

Hey, some time ago I updated Cabal's support for JHC. I hope that it is 
still not outdated, again. I hoped to be able to install a pacakge and 
all of its dependencies automatically with cabal-install. This would 
work in principle, but in the real world the core packages for JHC and 
GHC are different. GHC's base is in fact a ghc-base, JHC has the same 
modules in different packages (like applicative). Thus I had to extend 
all the packages I wanted by Cabal flags. Not very nice. I do very very 
much hope, that GHC's base one day is suitably small in order to be used 
by all current Haskell systems, and that package developers try harder 
to write their packages such that they can be ported to compilers other 
than GHC (e.g. resist from using newest GHC features). Maybe programming 
those mobile devices are enough of an application to make JHC more 
important in future.



More information about the Haskell-Cafe mailing list