Quantcast

How to use Plugins package?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How to use Plugins package?

Andrey Yankin
Hi,

I'm newbie and I've got a problem.

I'm trying to get example programs from plugins-auto [1] or hotswap [2] to work.
I think question on stackoverflow [3] somewhat related to my problem.

They are compiled well, but in runtime I get either
segfault
or Prelude.undefined
or internal error: PAP object entered!

I use GHC 7.4.1. x86_64 Ubuntu

I've read "Plugging Haskell In" and would like to make some fun with
plugins, but alas...

Maybe -dynamic flag is what I seek? Or maybe I need to know something else?
Maybe I needn't use Plugins package like in gitit?

Please, could you explain how to compile plugins in haskell correctly?
Where should I start?


[1] http://hackage.haskell.org/package/plugins-auto
[2] http://hackage.haskell.org/package/hotswap
[3] http://stackoverflow.com/questions/5427777/help-with-haskell-dynamic-plugin-load

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to use Plugins package?

Jeremy Shaw-3
plugins-auto has a demo in the darcs repo:

http://www.patch-tag.com/r/facundo/plugins-auto/snapshot/current/content/pretty/demo

Does that work for you ?

- jeremy

On Wed, May 16, 2012 at 9:46 AM, Андрей Янкин <[hidden email]> wrote:

> Hi,
>
> I'm newbie and I've got a problem.
>
> I'm trying to get example programs from plugins-auto [1] or hotswap [2] to work.
> I think question on stackoverflow [3] somewhat related to my problem.
>
> They are compiled well, but in runtime I get either
> segfault
> or Prelude.undefined
> or internal error: PAP object entered!
>
> I use GHC 7.4.1. x86_64 Ubuntu
>
> I've read "Plugging Haskell In" and would like to make some fun with
> plugins, but alas...
>
> Maybe -dynamic flag is what I seek? Or maybe I need to know something else?
> Maybe I needn't use Plugins package like in gitit?
>
> Please, could you explain how to compile plugins in haskell correctly?
> Where should I start?
>
>
> [1] http://hackage.haskell.org/package/plugins-auto
> [2] http://hackage.haskell.org/package/hotswap
> [3] http://stackoverflow.com/questions/5427777/help-with-haskell-dynamic-plugin-load
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to use Plugins package?

Andrey Yankin
I tried this and all other examples I could find.
They didn't work. I hadn't find any explanation yet.
And I don't know how I can get more information about errors.

I believe Plugins uses GHC API internally.
Нowever code like [1] works well for me on Linux and Windows.
I think I'll stay with this approach for a while.
What limitations does it have?

I appreciate your help.
It would be nice to understand what prevents me from using Plugins.

[1] https://github.com/jgm/gitit/blob/master/Network/Gitit/Plugins.hs


2012/5/18 Jeremy Shaw <[hidden email]>:

> plugins-auto has a demo in the darcs repo:
>
> http://www.patch-tag.com/r/facundo/plugins-auto/snapshot/current/content/pretty/demo
>
> Does that work for you ?
>
> - jeremy
>
> On Wed, May 16, 2012 at 9:46 AM, Андрей Янкин <[hidden email]> wrote:
>> Hi,
>>
>> I'm newbie and I've got a problem.
>>
>> I'm trying to get example programs from plugins-auto [1] or hotswap [2] to work.
>> I think question on stackoverflow [3] somewhat related to my problem.
>>
>> They are compiled well, but in runtime I get either
>> segfault
>> or Prelude.undefined
>> or internal error: PAP object entered!
>>
>> I use GHC 7.4.1. x86_64 Ubuntu
>>
>> I've read "Plugging Haskell In" and would like to make some fun with
>> plugins, but alas...
>>
>> Maybe -dynamic flag is what I seek? Or maybe I need to know something else?
>> Maybe I needn't use Plugins package like in gitit?
>>
>> Please, could you explain how to compile plugins in haskell correctly?
>> Where should I start?
>>
>>
>> [1] http://hackage.haskell.org/package/plugins-auto
>> [2] http://hackage.haskell.org/package/hotswap
>> [3] http://stackoverflow.com/questions/5427777/help-with-haskell-dynamic-plugin-load
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> [hidden email]
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Loading...