specifying common 'dis's in greencard

Sigbjorn Finne sof@galois.com
Wed, 29 May 2002 16:52:27 -0700

Something like:

foo$ cat Foo.gc
module Foo where
import StdDIS
%dis foo x = char x

foo$ cat Bar.gc
module Bar where
import StdDIS
import Foo
%fun f :: Foo -> IO ()

foo$ green-card -i/path/to/green-card/lib/ghc -tffi Bar.gc


----- Original Message -----
From: "Hal Daume III" <hdaume@ISI.EDU>
To: <sof@galois.com>; "GHC Users Mailing List"
Sent: Wednesday, May 29, 2002 16:41
Subject: specifying common 'dis's in greencard

> Hi,
> I have three modules which all use the same (or some of the same) %dis
> directives; I'd like to pull these out into their own file (a module
> called "MyDIS" or something), but I can't figure out how to get green-card
> to look at those definitions (I've `import`ed it in the modules that need
> it and put it's directory in the search path with -i).  Unfortunately,
> even so it complains that it doesn't know how to marshall my datatypes.
> Any suggestions?
>  - Hal
> --
> Hal Daume III
>  "Computer science is no more about computers    | hdaume@isi.edu
>   than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users