[jhc] darcs patch: Add foreign import "dynamic" support (and 4 more)

Samuel Bronson naesten at gmail.com
Fri Jul 6 21:56:10 EDT 2007

On 7/6/07, John Meacham <john at repetae.net> wrote:
> On Fri, Jul 06, 2007 at 07:28:52PM -0400, Samuel Bronson wrote:
> > Fri Jul  6 12:11:13 EDT 2007  Samuel Bronson <naesten at gmail.com>
> >   * Remove E/FromHs.hs~ from repo
> I don't have a E/FromHs.hs~ in my repo so this patch can't apply,
> perhaps something odd is going on?

Have you removed yours in your working branch? I'm working against

> > Fri Jul  6 18:56:11 EDT 2007  Samuel Bronson <naesten at gmail.com>
> >   * Get pure foreign exports through E... Grin forgets them though
> Could you explain a little more about this patch? thanks.

Well, I've got "foreign export ccall" generating E that typechecks and
gets translated into grin for pure functions... but it isn't yet added
to grinEntryPoints. Also, somehow "f"s are getting stuck on the
beginning of the names...

For example:

import Jhc.Int
import Jhc.Enum

foreign export increment :: Int -> Int
foreign export succ :: Int -> Int

But don't try:

import Jhc.IO
import Jhc.Num

foreign export foo :: IO Int

foo :: Num a => IO a
foo = returnIO 1

-- because I haven't figured out how to generate the code for those
quite yet. I think I might need unsafePerformIO?

P.S. sorear (stefanor) and dons say that we'd be interested in hearing
about what FunctorM has that Control.Applicative lacks.
libraries at haskell.org recieves library complaints, questions, and
comments *very* well. Basically, we want to know what the problem is
so we can fix it ;-).

More information about the jhc mailing list