From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <1484422331.1503949.847799976.412906D2@webmail.messagingengine.com> From: Ramakrishnan Muthukrishnan To: 9fans@9fans.net MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" References: <20170113032910.GA13350@master> <1484286924.1672885.846353336.21E2AFA2@webmail.messagingengine.com> <20170113140525.GB24399@master> In-Reply-To: <20170113140525.GB24399@master> Date: Sun, 15 Jan 2017 01:02:11 +0530 Subject: Re: [9fans] Porting Idris to 9front Topicbox-Message-UUID: b1b68da0-ead9-11e9-9d60-3106f5b1d025 On Fri, Jan 13, 2017, at 07:35 PM, Joe M wrote: > > > > Don't you need GHC to compile Idris? > > http://docs.idris-lang.org/en/latest/faq/faq.html#when-will-idris-be-self-hosting > > I have the posix version of the rts working on 9front. The default C > backend generated code compiled and runs on 9front. I generated the c > code on linux though. That's very nice to hear. > As a next step, I want to take it further and make the rts and backend > work with the 9front native C compiler/linker. I presume that this > will help make it easy to FFI with the native C libraries (bio, > thread, etc.) and stay closer to the plan 9 libraries' behaviour. > > > Afaik, there is no Plan 9 port of GHC. And GHC is self hosted. Perhaps > > one should approach it by creating a plan 9 binary from another OS and > > use that to compile GHC? > > That is a good idea. Native GHC on 9front seems to be a daunting task > as the GHC IO manager's behaviour might not be compatible with the > 9front syscall behaviour, imho. But, I have no clue of the GHC > internals, so, it might be an easy task. After reading your message, I tried compiling a simple program using the '-fviaC'. But it looks like, on newer GHC it is deprecated and is going to be removed soon. > Maybe, ghc can run with the linux-emu package? I will try that. Thanks. -- Ramakrishnan