From jbrownson at gmail.com Wed Apr 23 01:25:10 2014 From: jbrownson at gmail.com (Jake Brownson) Date: Tue, 22 Apr 2014 18:25:10 -0700 Subject: [Haskell-iPhone] Objective C bindings? Message-ID: https://code.google.com/p/hoc/ Is anybody aware of any efforts to revive the HOC project that provides Objective-C bindings for Haskell? Or any alternatives to it? It seems like it would be a great complement to the iOS cross compiler. I've started reading through the code to see what it might take to get them working w/ recent GHCs. the last commit on the google code project was 2010. When I do the "runhaskell Setup.hs build" from the installation instructions I get a few things like this: "Unacceptable argument type in foreign declaration: CInt" which seems to be explained by this as due to a change in FFI at some point: http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html I'm just starting to dig into this so maybe there's a good reason nobody else has. I'm pretty new to Haskell, but I love the idea of making native GUIs for OS X and eventually iOS. From maxwellswadling at gmail.com Thu Apr 24 04:27:19 2014 From: maxwellswadling at gmail.com (Maxwell Swadling) Date: Thu, 24 Apr 2014 14:27:19 +1000 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: References: Message-ID: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> Hello! I think ObjectiveHaskell is a more practical choice today than HOC. ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, which will simplify the build process. https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot Try it out. __END__ Maxwell Swadling > On 23 Apr 2014, at 11:25 am, Jake Brownson wrote: > > https://code.google.com/p/hoc/ > > Is anybody aware of any efforts to revive the HOC project that > provides Objective-C bindings for Haskell? Or any alternatives to it? > It seems like it would be a great complement to the iOS cross > compiler. I've started reading through the code to see what it might > take to get them working w/ recent GHCs. the last commit on the google > code project was 2010. > > When I do the "runhaskell Setup.hs build" from the installation > instructions I get a few things like this: > > "Unacceptable argument type in foreign declaration: CInt" > > which seems to be explained by this as due to a change in FFI at some > point: http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html > > I'm just starting to dig into this so maybe there's a good reason > nobody else has. I'm pretty new to Haskell, but I love the idea of > making native GUIs for OS X and eventually iOS. > _______________________________________________ > iPhone mailing list > iPhone at haskell.org > http://www.haskell.org/mailman/listinfo/iphone From lukexipd at gmail.com Thu Apr 24 06:25:43 2014 From: lukexipd at gmail.com (Luke Iannini) Date: Wed, 23 Apr 2014 23:25:43 -0700 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> References: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> Message-ID: Yo Jake, Yeah, what Max said. Sigh, I've done this (updated OH to use Max's static lib support, fixed a bunch of bugs, and other things) an have been promising to clean it up enough to release for quite some time. The yucky bit is that I manually converted it to strip out the Template Haskell usage which both makes it much uglier and not nearly as nice to use. But it works, and that's something : ), so I'll get going. I think we could design something even nicer with Type Families sometime that didn't require TH. Cheers Luke On Wed, Apr 23, 2014 at 9:27 PM, Maxwell Swadling wrote: > Hello! > > I think ObjectiveHaskell is a more practical choice today than HOC. > > ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, > which will simplify the build process. > > https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot > > Try it out. > > __END__ > Maxwell Swadling > > > On 23 Apr 2014, at 11:25 am, Jake Brownson wrote: > > > > https://code.google.com/p/hoc/ > > > > Is anybody aware of any efforts to revive the HOC project that > > provides Objective-C bindings for Haskell? Or any alternatives to it? > > It seems like it would be a great complement to the iOS cross > > compiler. I've started reading through the code to see what it might > > take to get them working w/ recent GHCs. the last commit on the google > > code project was 2010. > > > > When I do the "runhaskell Setup.hs build" from the installation > > instructions I get a few things like this: > > > > "Unacceptable argument type in foreign declaration: CInt" > > > > which seems to be explained by this as due to a change in FFI at some > > point: > http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html > > > > I'm just starting to dig into this so maybe there's a good reason > > nobody else has. I'm pretty new to Haskell, but I love the idea of > > making native GUIs for OS X and eventually iOS. > > _______________________________________________ > > iPhone mailing list > > iPhone at haskell.org > > http://www.haskell.org/mailman/listinfo/iphone > _______________________________________________ > iPhone mailing list > iPhone at haskell.org > http://www.haskell.org/mailman/listinfo/iphone > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbrownson at gmail.com Thu Apr 24 20:28:23 2014 From: jbrownson at gmail.com (Jake Brownson) Date: Thu, 24 Apr 2014 13:28:23 -0700 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: References: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> Message-ID: Thanks for the tips guys, and thanks to Luke for his work in this area! I came across ObjectiveHaskell but got the idea that it was more for calling HS from ObjectiveC, but I think I got the wrong idea looking closer. The samples all still have a bunch of .m files in with them. It'd be awesome to purely have .hs files which I believe HOC would allow. However as I was searching for ObjectiveHaskell on hackage I came across the language-inline-c project which is still in development, but looks really interesting: https://github.com/mchakravarty/language-c-inline/wiki/Motivation It uses quaiquoting to let you write objective-c or c directly inline in a .hs file and it'll compile it and hook up all the values automatically (or that's what I get from reading the website anyway, haven't tried it yet). On Wed, Apr 23, 2014 at 11:25 PM, Luke Iannini wrote: > Yo Jake, > Yeah, what Max said. Sigh, I've done this (updated OH to use Max's static > lib support, fixed a bunch of bugs, and other things) an have been promising > to clean it up enough to release for quite some time. The yucky bit is that > I manually converted it to strip out the Template Haskell usage which both > makes it much uglier and not nearly as nice to use. But it works, and that's > something : ), so I'll get going. > > I think we could design something even nicer with Type Families sometime > that didn't require TH. > > Cheers > Luke > > > On Wed, Apr 23, 2014 at 9:27 PM, Maxwell Swadling > wrote: >> >> Hello! >> >> I think ObjectiveHaskell is a more practical choice today than HOC. >> >> ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, >> which will simplify the build process. >> >> https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot >> >> Try it out. >> >> __END__ >> Maxwell Swadling >> >> > On 23 Apr 2014, at 11:25 am, Jake Brownson wrote: >> > >> > https://code.google.com/p/hoc/ >> > >> > Is anybody aware of any efforts to revive the HOC project that >> > provides Objective-C bindings for Haskell? Or any alternatives to it? >> > It seems like it would be a great complement to the iOS cross >> > compiler. I've started reading through the code to see what it might >> > take to get them working w/ recent GHCs. the last commit on the google >> > code project was 2010. >> > >> > When I do the "runhaskell Setup.hs build" from the installation >> > instructions I get a few things like this: >> > >> > "Unacceptable argument type in foreign declaration: CInt" >> > >> > which seems to be explained by this as due to a change in FFI at some >> > point: >> > http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html >> > >> > I'm just starting to dig into this so maybe there's a good reason >> > nobody else has. I'm pretty new to Haskell, but I love the idea of >> > making native GUIs for OS X and eventually iOS. >> > _______________________________________________ >> > iPhone mailing list >> > iPhone at haskell.org >> > http://www.haskell.org/mailman/listinfo/iphone >> _______________________________________________ >> iPhone mailing list >> iPhone at haskell.org >> http://www.haskell.org/mailman/listinfo/iphone > > From chak at cse.unsw.edu.au Fri Apr 25 11:10:50 2014 From: chak at cse.unsw.edu.au (Manuel M T Chakravarty) Date: Fri, 25 Apr 2014 13:10:50 +0200 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: References: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> Message-ID: The problem with language-c-inline for iOS at the moment is that it relies on TH in a very essential way. Manuel Jake Brownson : > Thanks for the tips guys, and thanks to Luke for his work in this area! > > I came across ObjectiveHaskell but got the idea that it was more for > calling HS from ObjectiveC, but I think I got the wrong idea looking > closer. The samples all still have a bunch of .m files in with them. > It'd be awesome to purely have .hs files which I believe HOC would > allow. > > However as I was searching for ObjectiveHaskell on hackage I came > across the language-inline-c project which is still in development, > but looks really interesting: > https://github.com/mchakravarty/language-c-inline/wiki/Motivation > > It uses quaiquoting to let you write objective-c or c directly inline > in a .hs file and it'll compile it and hook up all the values > automatically (or that's what I get from reading the website anyway, > haven't tried it yet). > > On Wed, Apr 23, 2014 at 11:25 PM, Luke Iannini wrote: >> Yo Jake, >> Yeah, what Max said. Sigh, I've done this (updated OH to use Max's static >> lib support, fixed a bunch of bugs, and other things) an have been promising >> to clean it up enough to release for quite some time. The yucky bit is that >> I manually converted it to strip out the Template Haskell usage which both >> makes it much uglier and not nearly as nice to use. But it works, and that's >> something : ), so I'll get going. >> >> I think we could design something even nicer with Type Families sometime >> that didn't require TH. >> >> Cheers >> Luke >> >> >> On Wed, Apr 23, 2014 at 9:27 PM, Maxwell Swadling >> wrote: >>> >>> Hello! >>> >>> I think ObjectiveHaskell is a more practical choice today than HOC. >>> >>> ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, >>> which will simplify the build process. >>> >>> https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot >>> >>> Try it out. >>> >>> __END__ >>> Maxwell Swadling >>> >>>> On 23 Apr 2014, at 11:25 am, Jake Brownson wrote: >>>> >>>> https://code.google.com/p/hoc/ >>>> >>>> Is anybody aware of any efforts to revive the HOC project that >>>> provides Objective-C bindings for Haskell? Or any alternatives to it? >>>> It seems like it would be a great complement to the iOS cross >>>> compiler. I've started reading through the code to see what it might >>>> take to get them working w/ recent GHCs. the last commit on the google >>>> code project was 2010. >>>> >>>> When I do the "runhaskell Setup.hs build" from the installation >>>> instructions I get a few things like this: >>>> >>>> "Unacceptable argument type in foreign declaration: CInt" >>>> >>>> which seems to be explained by this as due to a change in FFI at some >>>> point: >>>> http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html >>>> >>>> I'm just starting to dig into this so maybe there's a good reason >>>> nobody else has. I'm pretty new to Haskell, but I love the idea of >>>> making native GUIs for OS X and eventually iOS. >>>> _______________________________________________ >>>> iPhone mailing list >>>> iPhone at haskell.org >>>> http://www.haskell.org/mailman/listinfo/iphone >>> _______________________________________________ >>> iPhone mailing list >>> iPhone at haskell.org >>> http://www.haskell.org/mailman/listinfo/iphone >> >> > _______________________________________________ > iPhone mailing list > iPhone at haskell.org > http://www.haskell.org/mailman/listinfo/iphone From jbrownson at gmail.com Fri Apr 25 16:33:58 2014 From: jbrownson at gmail.com (Jake Brownson) Date: Fri, 25 Apr 2014 09:33:58 -0700 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: References: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> Message-ID: I did some googling on the TH issue. I was already vaguely familiar that it was a problem in cross compliers. I'm sure I'm not pointing out anything you guys don't already know, but just to show what I was able to find myself. This seemed to the the most obvious information on the topic is in this thread: http://www.haskell.org/pipermail/ghc-devs/2013-June/001473.html There seem to be a couple of self-described hacks to work around the issue by preprocessing the TH of sorts: http://joeyh.name/blog/entry/Template_Haskell_on_impossible_architectures/ http://hackage.haskell.org/package/zeroth >From my ~hour of googling it looks like there was hope to get a (hacky?) TH cross compiler patch set from the GHCJS project merged in to 7.8, and the 7.8 release notes talk about improved cross compilation support, but I take it those patches didn't make it in? It seems like there are several folks including yourselves pushing in the direction of getting Haskell to run w/ nice bindings on iOS, and the TH cross compiler problem is the biggest hurdle remaining. Is the current thinking that we have to find a way to do it w/o proper TH, or is there still hope that we can have it and get an incredible solution like language-c-inline going? Is the problem a lack of interest from the folks qualified to make changes to GHC? It it in progress and just not making a lot of noise? I'm not sure how the community works :) I'm pretty seriously interested in this capability and would offer assistance moving forward w/ it. I'm really tired of using C++ to write apps, and have really fallen in love w/ Haskell over the past few months. It seems like there are already a number of folks w/ longer Haskell backgrounds than myself who have tried so I'm not sure what more I have to offer, but I offer it. On Fri, Apr 25, 2014 at 4:10 AM, Manuel M T Chakravarty wrote: > The problem with language-c-inline for iOS at the moment is that it relies on TH in a very essential way. > > Manuel > > > Jake Brownson : >> Thanks for the tips guys, and thanks to Luke for his work in this area! >> >> I came across ObjectiveHaskell but got the idea that it was more for >> calling HS from ObjectiveC, but I think I got the wrong idea looking >> closer. The samples all still have a bunch of .m files in with them. >> It'd be awesome to purely have .hs files which I believe HOC would >> allow. >> >> However as I was searching for ObjectiveHaskell on hackage I came >> across the language-inline-c project which is still in development, >> but looks really interesting: >> https://github.com/mchakravarty/language-c-inline/wiki/Motivation >> >> It uses quaiquoting to let you write objective-c or c directly inline >> in a .hs file and it'll compile it and hook up all the values >> automatically (or that's what I get from reading the website anyway, >> haven't tried it yet). >> >> On Wed, Apr 23, 2014 at 11:25 PM, Luke Iannini wrote: >>> Yo Jake, >>> Yeah, what Max said. Sigh, I've done this (updated OH to use Max's static >>> lib support, fixed a bunch of bugs, and other things) an have been promising >>> to clean it up enough to release for quite some time. The yucky bit is that >>> I manually converted it to strip out the Template Haskell usage which both >>> makes it much uglier and not nearly as nice to use. But it works, and that's >>> something : ), so I'll get going. >>> >>> I think we could design something even nicer with Type Families sometime >>> that didn't require TH. >>> >>> Cheers >>> Luke >>> >>> >>> On Wed, Apr 23, 2014 at 9:27 PM, Maxwell Swadling >>> wrote: >>>> >>>> Hello! >>>> >>>> I think ObjectiveHaskell is a more practical choice today than HOC. >>>> >>>> ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, >>>> which will simplify the build process. >>>> >>>> https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot >>>> >>>> Try it out. >>>> >>>> __END__ >>>> Maxwell Swadling >>>> >>>>> On 23 Apr 2014, at 11:25 am, Jake Brownson wrote: >>>>> >>>>> https://code.google.com/p/hoc/ >>>>> >>>>> Is anybody aware of any efforts to revive the HOC project that >>>>> provides Objective-C bindings for Haskell? Or any alternatives to it? >>>>> It seems like it would be a great complement to the iOS cross >>>>> compiler. I've started reading through the code to see what it might >>>>> take to get them working w/ recent GHCs. the last commit on the google >>>>> code project was 2010. >>>>> >>>>> When I do the "runhaskell Setup.hs build" from the installation >>>>> instructions I get a few things like this: >>>>> >>>>> "Unacceptable argument type in foreign declaration: CInt" >>>>> >>>>> which seems to be explained by this as due to a change in FFI at some >>>>> point: >>>>> http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html >>>>> >>>>> I'm just starting to dig into this so maybe there's a good reason >>>>> nobody else has. I'm pretty new to Haskell, but I love the idea of >>>>> making native GUIs for OS X and eventually iOS. >>>>> _______________________________________________ >>>>> iPhone mailing list >>>>> iPhone at haskell.org >>>>> http://www.haskell.org/mailman/listinfo/iphone >>>> _______________________________________________ >>>> iPhone mailing list >>>> iPhone at haskell.org >>>> http://www.haskell.org/mailman/listinfo/iphone >>> >>> >> _______________________________________________ >> iPhone mailing list >> iPhone at haskell.org >> http://www.haskell.org/mailman/listinfo/iphone > From chak at cse.unsw.edu.au Fri Apr 25 18:02:32 2014 From: chak at cse.unsw.edu.au (Manuel M T Chakravarty) Date: Fri, 25 Apr 2014 20:02:32 +0200 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: References: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> Message-ID: <89BB5028-3A19-475F-94F1-3C83F00C22F4@cse.unsw.edu.au> I am banking on the iOS cross-compiler either eventually supporting TH or that we can alter GHC such that TH can be eliminated in a pre-processing step. (Most of the code generated with language-c-inline code is usually foreign code anyway) Manuel Jake Brownson : > I did some googling on the TH issue. I was already vaguely familiar > that it was a problem in cross compliers. I'm sure I'm not pointing > out anything you guys don't already know, but just to show what I was > able to find myself. This seemed to the the most obvious information > on the topic is in this thread: > http://www.haskell.org/pipermail/ghc-devs/2013-June/001473.html > > There seem to be a couple of self-described hacks to work around the > issue by preprocessing the TH of sorts: > http://joeyh.name/blog/entry/Template_Haskell_on_impossible_architectures/ > http://hackage.haskell.org/package/zeroth > > From my ~hour of googling it looks like there was hope to get a > (hacky?) TH cross compiler patch set from the GHCJS project merged in > to 7.8, and the 7.8 release notes talk about improved cross > compilation support, but I take it those patches didn't make it in? > > It seems like there are several folks including yourselves pushing in > the direction of getting Haskell to run w/ nice bindings on iOS, and > the TH cross compiler problem is the biggest hurdle remaining. Is the > current thinking that we have to find a way to do it w/o proper TH, or > is there still hope that we can have it and get an incredible solution > like language-c-inline going? > > Is the problem a lack of interest from the folks qualified to make > changes to GHC? It it in progress and just not making a lot of noise? > I'm not sure how the community works :) > > I'm pretty seriously interested in this capability and would offer > assistance moving forward w/ it. I'm really tired of using C++ to > write apps, and have really fallen in love w/ Haskell over the past > few months. It seems like there are already a number of folks w/ > longer Haskell backgrounds than myself who have tried so I'm not sure > what more I have to offer, but I offer it. > > On Fri, Apr 25, 2014 at 4:10 AM, Manuel M T Chakravarty > wrote: >> The problem with language-c-inline for iOS at the moment is that it relies on TH in a very essential way. >> >> Manuel >> >> >> Jake Brownson : >>> Thanks for the tips guys, and thanks to Luke for his work in this area! >>> >>> I came across ObjectiveHaskell but got the idea that it was more for >>> calling HS from ObjectiveC, but I think I got the wrong idea looking >>> closer. The samples all still have a bunch of .m files in with them. >>> It'd be awesome to purely have .hs files which I believe HOC would >>> allow. >>> >>> However as I was searching for ObjectiveHaskell on hackage I came >>> across the language-inline-c project which is still in development, >>> but looks really interesting: >>> https://github.com/mchakravarty/language-c-inline/wiki/Motivation >>> >>> It uses quaiquoting to let you write objective-c or c directly inline >>> in a .hs file and it'll compile it and hook up all the values >>> automatically (or that's what I get from reading the website anyway, >>> haven't tried it yet). >>> >>> On Wed, Apr 23, 2014 at 11:25 PM, Luke Iannini wrote: >>>> Yo Jake, >>>> Yeah, what Max said. Sigh, I've done this (updated OH to use Max's static >>>> lib support, fixed a bunch of bugs, and other things) an have been promising >>>> to clean it up enough to release for quite some time. The yucky bit is that >>>> I manually converted it to strip out the Template Haskell usage which both >>>> makes it much uglier and not nearly as nice to use. But it works, and that's >>>> something : ), so I'll get going. >>>> >>>> I think we could design something even nicer with Type Families sometime >>>> that didn't require TH. >>>> >>>> Cheers >>>> Luke >>>> >>>> >>>> On Wed, Apr 23, 2014 at 9:27 PM, Maxwell Swadling >>>> wrote: >>>>> >>>>> Hello! >>>>> >>>>> I think ObjectiveHaskell is a more practical choice today than HOC. >>>>> >>>>> ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, >>>>> which will simplify the build process. >>>>> >>>>> https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot >>>>> >>>>> Try it out. >>>>> >>>>> __END__ >>>>> Maxwell Swadling >>>>> >>>>>> On 23 Apr 2014, at 11:25 am, Jake Brownson wrote: >>>>>> >>>>>> https://code.google.com/p/hoc/ >>>>>> >>>>>> Is anybody aware of any efforts to revive the HOC project that >>>>>> provides Objective-C bindings for Haskell? Or any alternatives to it? >>>>>> It seems like it would be a great complement to the iOS cross >>>>>> compiler. I've started reading through the code to see what it might >>>>>> take to get them working w/ recent GHCs. the last commit on the google >>>>>> code project was 2010. >>>>>> >>>>>> When I do the "runhaskell Setup.hs build" from the installation >>>>>> instructions I get a few things like this: >>>>>> >>>>>> "Unacceptable argument type in foreign declaration: CInt" >>>>>> >>>>>> which seems to be explained by this as due to a change in FFI at some >>>>>> point: >>>>>> http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html >>>>>> >>>>>> I'm just starting to dig into this so maybe there's a good reason >>>>>> nobody else has. I'm pretty new to Haskell, but I love the idea of >>>>>> making native GUIs for OS X and eventually iOS. >>>>>> _______________________________________________ >>>>>> iPhone mailing list >>>>>> iPhone at haskell.org >>>>>> http://www.haskell.org/mailman/listinfo/iphone >>>>> _______________________________________________ >>>>> iPhone mailing list >>>>> iPhone at haskell.org >>>>> http://www.haskell.org/mailman/listinfo/iphone >>>> >>>> >>> _______________________________________________ >>> iPhone mailing list >>> iPhone at haskell.org >>> http://www.haskell.org/mailman/listinfo/iphone >> From carter.schonwald at gmail.com Fri Apr 25 18:56:42 2014 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Fri, 25 Apr 2014 14:56:42 -0400 Subject: [Haskell-iPhone] Objective C bindings? In-Reply-To: <89BB5028-3A19-475F-94F1-3C83F00C22F4@cse.unsw.edu.au> References: <6AA5E3F3-570D-4D9F-80CC-C92430C6E3A6@gmail.com> <89BB5028-3A19-475F-94F1-3C83F00C22F4@cse.unsw.edu.au> Message-ID: I think the *easiest* (in some sense) approach is to figure out how to improve ghc to have multi target support! I do know that Austin has started hacking on adding -march=foo style tooling to ghc proper. Adding the ability to native and cross compile with the same GHC would enable ghc IOS to use stage2 ghc, and thence (in the style of ghcjs) build both host native and target native versions of each lib, and use the host build for TH. Or at least thats what I think *might* be the sanest approach. But this, like every other large nitty gritty ghc project, needs a hero to lead the charge and try and hack it out! On Fri, Apr 25, 2014 at 2:02 PM, Manuel M T Chakravarty < chak at cse.unsw.edu.au> wrote: > I am banking on the iOS cross-compiler either eventually supporting TH or > that we can alter GHC such that TH can be eliminated in a pre-processing > step. (Most of the code generated with language-c-inline code is usually > foreign code anyway) > > Manuel > > Jake Brownson : > > I did some googling on the TH issue. I was already vaguely familiar > > that it was a problem in cross compliers. I'm sure I'm not pointing > > out anything you guys don't already know, but just to show what I was > > able to find myself. This seemed to the the most obvious information > > on the topic is in this thread: > > http://www.haskell.org/pipermail/ghc-devs/2013-June/001473.html > > > > There seem to be a couple of self-described hacks to work around the > > issue by preprocessing the TH of sorts: > > > http://joeyh.name/blog/entry/Template_Haskell_on_impossible_architectures/ > > http://hackage.haskell.org/package/zeroth > > > > From my ~hour of googling it looks like there was hope to get a > > (hacky?) TH cross compiler patch set from the GHCJS project merged in > > to 7.8, and the 7.8 release notes talk about improved cross > > compilation support, but I take it those patches didn't make it in? > > > > It seems like there are several folks including yourselves pushing in > > the direction of getting Haskell to run w/ nice bindings on iOS, and > > the TH cross compiler problem is the biggest hurdle remaining. Is the > > current thinking that we have to find a way to do it w/o proper TH, or > > is there still hope that we can have it and get an incredible solution > > like language-c-inline going? > > > > Is the problem a lack of interest from the folks qualified to make > > changes to GHC? It it in progress and just not making a lot of noise? > > I'm not sure how the community works :) > > > > I'm pretty seriously interested in this capability and would offer > > assistance moving forward w/ it. I'm really tired of using C++ to > > write apps, and have really fallen in love w/ Haskell over the past > > few months. It seems like there are already a number of folks w/ > > longer Haskell backgrounds than myself who have tried so I'm not sure > > what more I have to offer, but I offer it. > > > > On Fri, Apr 25, 2014 at 4:10 AM, Manuel M T Chakravarty > > wrote: > >> The problem with language-c-inline for iOS at the moment is that it > relies on TH in a very essential way. > >> > >> Manuel > >> > >> > >> Jake Brownson : > >>> Thanks for the tips guys, and thanks to Luke for his work in this area! > >>> > >>> I came across ObjectiveHaskell but got the idea that it was more for > >>> calling HS from ObjectiveC, but I think I got the wrong idea looking > >>> closer. The samples all still have a bunch of .m files in with them. > >>> It'd be awesome to purely have .hs files which I believe HOC would > >>> allow. > >>> > >>> However as I was searching for ObjectiveHaskell on hackage I came > >>> across the language-inline-c project which is still in development, > >>> but looks really interesting: > >>> https://github.com/mchakravarty/language-c-inline/wiki/Motivation > >>> > >>> It uses quaiquoting to let you write objective-c or c directly inline > >>> in a .hs file and it'll compile it and hook up all the values > >>> automatically (or that's what I get from reading the website anyway, > >>> haven't tried it yet). > >>> > >>> On Wed, Apr 23, 2014 at 11:25 PM, Luke Iannini > wrote: > >>>> Yo Jake, > >>>> Yeah, what Max said. Sigh, I've done this (updated OH to use Max's > static > >>>> lib support, fixed a bunch of bugs, and other things) an have been > promising > >>>> to clean it up enough to release for quite some time. The yucky bit > is that > >>>> I manually converted it to strip out the Template Haskell usage which > both > >>>> makes it much uglier and not nearly as nice to use. But it works, and > that's > >>>> something : ), so I'll get going. > >>>> > >>>> I think we could design something even nicer with Type Families > sometime > >>>> that didn't require TH. > >>>> > >>>> Cheers > >>>> Luke > >>>> > >>>> > >>>> On Wed, Apr 23, 2014 at 9:27 PM, Maxwell Swadling > >>>> wrote: > >>>>> > >>>>> Hello! > >>>>> > >>>>> I think ObjectiveHaskell is a more practical choice today than HOC. > >>>>> > >>>>> ObjectiveHaskell could be cleaned up to use the new GHC 7.8 features, > >>>>> which will simplify the build process. > >>>>> > >>>>> https://github.com/jspahrsummers/ObjectiveHaskell/tree/reboot > >>>>> > >>>>> Try it out. > >>>>> > >>>>> __END__ > >>>>> Maxwell Swadling > >>>>> > >>>>>> On 23 Apr 2014, at 11:25 am, Jake Brownson > wrote: > >>>>>> > >>>>>> https://code.google.com/p/hoc/ > >>>>>> > >>>>>> Is anybody aware of any efforts to revive the HOC project that > >>>>>> provides Objective-C bindings for Haskell? Or any alternatives to > it? > >>>>>> It seems like it would be a great complement to the iOS cross > >>>>>> compiler. I've started reading through the code to see what it might > >>>>>> take to get them working w/ recent GHCs. the last commit on the > google > >>>>>> code project was 2010. > >>>>>> > >>>>>> When I do the "runhaskell Setup.hs build" from the installation > >>>>>> instructions I get a few things like this: > >>>>>> > >>>>>> "Unacceptable argument type in foreign declaration: CInt" > >>>>>> > >>>>>> which seems to be explained by this as due to a change in FFI at > some > >>>>>> point: > >>>>>> > http://haskell.1045720.n5.nabble.com/zlib-build-failure-on-recent-GHC-td4971516.html > >>>>>> > >>>>>> I'm just starting to dig into this so maybe there's a good reason > >>>>>> nobody else has. I'm pretty new to Haskell, but I love the idea of > >>>>>> making native GUIs for OS X and eventually iOS. > >>>>>> _______________________________________________ > >>>>>> iPhone mailing list > >>>>>> iPhone at haskell.org > >>>>>> http://www.haskell.org/mailman/listinfo/iphone > >>>>> _______________________________________________ > >>>>> iPhone mailing list > >>>>> iPhone at haskell.org > >>>>> http://www.haskell.org/mailman/listinfo/iphone > >>>> > >>>> > >>> _______________________________________________ > >>> iPhone mailing list > >>> iPhone at haskell.org > >>> http://www.haskell.org/mailman/listinfo/iphone > >> > > _______________________________________________ > iPhone mailing list > iPhone at haskell.org > http://www.haskell.org/mailman/listinfo/iphone > -------------- next part -------------- An HTML attachment was scrubbed... URL: