[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-jhc
Subject:    Re: [jhc] How newStablePtr return un-packable IO ()?
From:       Kiwamu Okabe <kiwamu () debian ! or ! jp>
Date:       2013-06-05 8:37:52
Message-ID: CAEvX6dkbn2TxmDM-vTR-ps9STvc+9iP4M+QcKdoqabcPoPHnpg () mail ! gmail ! com
[Download RAW message or body]

Hi.

On Wed, Jun 5, 2013 at 1:59 PM, Kiwamu Okabe <kiwamu@debian.or.jp> wrote:
> Now, I am trying create forkOS with  pthread.
> But StablePtr error stops it.
> Jhc's newStablePtr cannot pack IO () for running with unpack.

This is small library for forkOS.

  https://github.com/ajhc/ajhc-dumpyard/tree/master/try_pthread2

But forkOS API is different from GHC's.

> forkOS :: FunPtr (Ptr () -> IO (Ptr ())) -> IO ThreadId

I would like to convert any IO () to FunPtr (IO ()).
Of course, GHC has foreign import ccall =93wrapper=94, but jhc not.
No idea in me.......

Regards,
--
Kiwamu Okabe

_______________________________________________
jhc mailing list
jhc@haskell.org
http://www.haskell.org/mailman/listinfo/jhc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic