Exporting an #include from one package to another?

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Nov 22 08:31:05 EST 2008


On Fri, 2008-11-21 at 18:28 -0800, Conal Elliott wrote:
> Is there a way to package up an #include like to share across (be
> #include'd into) various other haskell packages?
> 
> I have some standard templates for type class instances that I can't
> define as instances without creating lots of overlapping instances.  I
> can write an include file easily enough, but I don't know how to get
> other packages to find and #include that include file.

Yes. This is partly what the "install-includes:" field in the .cabal
file is for.

Each client has to #include it explicitly of course, but the include
search path should be set up to make that work.

Duncan



More information about the Glasgow-haskell-users mailing list