GHC Platform-independent object files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GHC Platform-independent object files

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.

Thanks,

_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHC Platform-independent object files

Ivan Lazar Miljenovic
On 27 July 2017 at 19:30, Hugo Pacheco <[hidden email]> 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
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHC Platform-independent object files

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

On Thu, Jul 27, 2017 at 10:52 AM, Ivan Lazar Miljenovic <[hidden email]> wrote:
On 27 July 2017 at 19:30, Hugo Pacheco <[hidden email]> 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
[hidden email]
http://IvanMiljenovic.wordpress.com



--

_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHC Platform-independent object files

Ivan Lazar Miljenovic
On 27 July 2017 at 20:26, Hugo Pacheco <[hidden email]> wrote:
> 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
> <[hidden email]> wrote:
>>
>> On 27 July 2017 at 19:30, Hugo Pacheco <[hidden email]> 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
>> [hidden email]
>> http://IvanMiljenovic.wordpress.com
>
>
>
>
> --
> www.di.uminho.pt/~hpacheco



--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GHC Platform-independent object files

Hugo Pacheco
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 <[hidden email]> wrote:
On 27 July 2017 at 20:26, Hugo Pacheco <[hidden email]> wrote:
> 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
> <[hidden email]> wrote:
>>
>> On 27 July 2017 at 19:30, Hugo Pacheco <[hidden email]> 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
>> [hidden email]
>> http://IvanMiljenovic.wordpress.com
>
>
>
>
> --
> www.di.uminho.pt/~hpacheco



--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com



--

_______________________________________________
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.
Loading...