Exporting an #include from one package to another?

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. - Conal

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

wonderful! i'll try it out. thanks, duncan.
On Sat, Nov 22, 2008 at 5:31 AM, Duncan Coutts
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
participants (2)
-
Conal Elliott
-
Duncan Coutts