GHC Platform-independent object files

Hi cafe, I am wondering if there is any easy way to distribute a Haskell module/library in a platform-independent manner without revealing the source code, that can be seamlessly linked with GHC? I am thinking about some sort of GHC object files or any intermediate representation such as C,LLVM or Haskell Core. My use case would be to release a small utility module as part of a student assignment without revealing its source code to students. Thanks, hugo -- www.di.uminho.pt/~hpacheco

On 27 July 2017 at 19:30, Hugo Pacheco
Hi cafe,
I am wondering if there is any easy way to distribute a Haskell module/library in a platform-independent manner without revealing the source code, that can be seamlessly linked with GHC? I am thinking about some sort of GHC object files or any intermediate representation such as C,LLVM or Haskell Core. My use case would be to release a small utility module as part of a student assignment without revealing its source code to students.
It's probably overkill, but maybe a Docker image containing the compiled libraries and have the students do their work within the image as well?
Thanks, hugo
-- www.di.uminho.pt/~hpacheco
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

That would work, but seems too limitative. I was hoping more for some sufficiently-obfuscated intermediate files that GHC could read (e.g., .hc). On Thu, Jul 27, 2017 at 10:52 AM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
Hi cafe,
I am wondering if there is any easy way to distribute a Haskell module/library in a platform-independent manner without revealing the
On 27 July 2017 at 19:30, Hugo Pacheco
wrote: source code, that can be seamlessly linked with GHC? I am thinking about some sort of GHC object files or any intermediate representation such as C,LLVM or Haskell Core. My use case would be to release a small utility module as part of a student assignment without revealing its source code to students.
It's probably overkill, but maybe a Docker image containing the compiled libraries and have the students do their work within the image as well?
Thanks, hugo
-- www.di.uminho.pt/~hpacheco
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
-- www.di.uminho.pt/~hpacheco

On 27 July 2017 at 20:26, Hugo Pacheco
That would work, but seems too limitative. I was hoping more for some sufficiently-obfuscated intermediate files that GHC could read (e.g., .hc).
I think they're all OS/platform specific (and then you have to deal with registering the libraries with ghc-pkg). Maybe it's possible to distribute Core and have that compiled by GHC; it would at least be partially obfuscated compared to the original Haskell.
On Thu, Jul 27, 2017 at 10:52 AM, Ivan Lazar Miljenovic
wrote: On 27 July 2017 at 19:30, Hugo Pacheco
wrote: Hi cafe,
I am wondering if there is any easy way to distribute a Haskell module/library in a platform-independent manner without revealing the source code, that can be seamlessly linked with GHC? I am thinking about some sort of GHC object files or any intermediate representation such as C,LLVM or Haskell Core. My use case would be to release a small utility module as part of a student assignment without revealing its source code to students.
It's probably overkill, but maybe a Docker image containing the compiled libraries and have the students do their work within the image as well?
Thanks, hugo
-- www.di.uminho.pt/~hpacheco
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
-- www.di.uminho.pt/~hpacheco
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

Yes, Core would be a good format. AFAIK, GHC only supports generating Core, but not reading Core. On Thu, Jul 27, 2017 at 12:11 PM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
That would work, but seems too limitative. I was hoping more for some sufficiently-obfuscated intermediate files
On 27 July 2017 at 20:26, Hugo Pacheco
wrote: that GHC could read (e.g., .hc).
I think they're all OS/platform specific (and then you have to deal with registering the libraries with ghc-pkg).
Maybe it's possible to distribute Core and have that compiled by GHC; it would at least be partially obfuscated compared to the original Haskell.
On Thu, Jul 27, 2017 at 10:52 AM, Ivan Lazar Miljenovic
wrote: On 27 July 2017 at 19:30, Hugo Pacheco
wrote: Hi cafe,
I am wondering if there is any easy way to distribute a Haskell module/library in a platform-independent manner without revealing the source code, that can be seamlessly linked with GHC? I am thinking about some sort of GHC object files or any intermediate representation such as C,LLVM or Haskell Core. My use case would be to release a small utility module as part of a student assignment without revealing its source code to students.
It's probably overkill, but maybe a Docker image containing the compiled libraries and have the students do their work within the image as well?
Thanks, hugo
-- www.di.uminho.pt/~hpacheco
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
-- www.di.uminho.pt/~hpacheco
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
-- www.di.uminho.pt/~hpacheco
participants (2)
-
Hugo Pacheco
-
Ivan Lazar Miljenovic