
Plugin support is not well documented, and could do with some love. If someone would like to take it up, I'm sure it could be improved a lot.
Simon
From: ghc-devs-bounces@haskell.org [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Amos Robinson
Sent: 29 May 2013 23:50
To: Conal Elliott
Cc: glasgow-haskell-users@haskell.org; ghc-devs@haskell.org
Subject: Re: Module import and use in GHC plugin?
I'd love to know a nicer way to do this, but what Ben Lippmeier did as a workaround is require a binding
"repa_primitives = R.primitives"
where repa_primitives is a record with references to all the primitive types you need. It's not great, but it works.
Plugin code:
http://code.ouroborus.net/repa/repa-head/repa-plugin/Data/Array/Repa/Plugin/...
Primitives export:
http://code.ouroborus.net/repa/repa-head/repa-series/Data/Array/Repa/Series/...
On Thu, May 30, 2013 at 7:37 AM, Conal Elliott