Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: exceptions and stacks (Ozgur Akgun)
2. Re: exceptions and stacks (Emmanuel Touzery)
3. Re: exceptions and stacks (Daniel Trstenjak)
4. Re: exceptions and stacks (Ozgur Akgun)
5. Re: exceptions and stacks (Emmanuel Touzery)
6. Re: dynamic set of objects in netwire (Nathan H?sken)
7. Re: exceptions and stacks (Emmanuel Touzery)
----------------------------------------------------------------------
Message: 1
Date: Thu, 8 Nov 2012 11:28:25 +0000
From: Ozgur Akgun <[email protected]>
Subject: Re: [Haskell-beginners] exceptions and stacks
To: Emmanuel Touzery <[email protected]>
Cc: Haskell Beginners <[email protected]>
Message-ID:
<CALzazPAOJMHBsUy4PxhC=gkkcrqf0r73tvt5dtovwmysb6a...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi,
On 6 November 2012 22:15, Emmanuel Touzery <[email protected]> wrote:
> If anybody has an idea what I did wrong with the -xc and the -RTS I'm all
> ears... I'd love to test it and find out how to make that work reliably.
>
You might want to have a look at the recent emails in ghc-users:
(Read Simon Marlow's reply as well)
http://www.haskell.org/pipermail/glasgow-haskell-users/2012-November/023029.html
HTH,
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20121108/57847014/attachment-0001.htm>
------------------------------
Message: 2
Date: Thu, 08 Nov 2012 12:31:09 +0100
From: Emmanuel Touzery <[email protected]>
Subject: Re: [Haskell-beginners] exceptions and stacks
To: Ozgur Akgun <[email protected]>
Cc: Haskell Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> On 6 November 2012 22:15, Emmanuel Touzery <[email protected]
> <mailto:[email protected]>> wrote:
>
> If anybody has an idea what I did wrong with the -xc and the -RTS
> I'm all ears... I'd love to test it and find out how to make that
> work reliably.
>
>
> You might want to have a look at the recent emails in ghc-users:
> (Read Simon Marlow's reply as well)
>
> http://www.haskell.org/pipermail/glasgow-haskell-users/2012-November/023029.html
>
reading this makes me think the reason why I got such an unhelpful
result with the +RTS -xc might be that I was doing that on the older
haskell platform, using GHC 7.0...
I may try it now on the latest haskell platform, with GHC 7.4 but who
knows, maybe I need GHC 7.6 to get these stack traces reliably, using
that -xc trick.
emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20121108/21d83674/attachment-0001.htm>
------------------------------
Message: 3
Date: Thu, 8 Nov 2012 12:45:12 +0100
From: Daniel Trstenjak <[email protected]>
Subject: Re: [Haskell-beginners] exceptions and stacks
To: [email protected]
Message-ID: <20121108114512.GA6939@machine>
Content-Type: text/plain; charset=us-ascii
On Thu, Nov 08, 2012 at 12:31:09PM +0100, Emmanuel Touzery wrote:
> reading this makes me think the reason why I got such an unhelpful
> result with the +RTS -xc might be that I was doing that on the older
> haskell platform, using GHC 7.0...
> I may try it now on the latest haskell platform, with GHC 7.4 but
> who knows, maybe I need GHC 7.6 to get these stack traces reliably,
> using that -xc trick.
Looking at the ticket 'http://hackage.haskell.org/trac/ghc/ticket/3693',
I don't now if even the current GHC version (7.6.1) is enough to
get stack traces.
Also the release notes of 7.6.1 don't contain anything about stack traces.
I think that stack traces are such a huge thing, that an early 7.6.2 just
adding these would be great.
Greetings,
Daniel
------------------------------
Message: 4
Date: Thu, 8 Nov 2012 12:08:30 +0000
From: Ozgur Akgun <[email protected]>
Subject: Re: [Haskell-beginners] exceptions and stacks
To: Haskell Beginners <[email protected]>
Message-ID:
<calzazpcemks1bno4n1q180uepl1dcvcepsrhmh5edf7tyty...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
fwiw, I am getting a stack trace with 7.6.1.
-- stack.hs
main = print $ foo [1]
foo xs = bar xs ++ bar xs
bar (x:xs) = [x, head xs]
$ ghc -prof -auto-all -rtsopts stack.hs
$ ./stack +RTS -xc
*** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace:
GHC.List.CAF
--> evaluated by: Main.bar,
called from Main.foo,
called from Main.main,
called from Main.CAF
--> evaluated by: Main.main,
called from Main.CAF
stack: Prelude.head: empty list
--
Ozgur Akgun
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20121108/ffefa624/attachment-0001.htm>
------------------------------
Message: 5
Date: Thu, 8 Nov 2012 18:32:43 +0100
From: Emmanuel Touzery <[email protected]>
Subject: Re: [Haskell-beginners] exceptions and stacks
To: [email protected]
Message-ID:
<CAC42Re=_=7tpj7savjv20p-g-0f+gj1xkqi6pbl8vsnso9g...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Well I tried and it displays the same with GHC 7.4.1.
However this is the output with GHC 7.0.4:
<GHC.List.CAF>stack: Prelude.head: empty list
So this is supported from 7.4 onwards (well maybe 7.2, I guess that version
existed).
So there are all the chances that with GHC 7.4.1 I would get a proper stack
for my problem. I'll try it soon but I must reinstall all the libraries
with profiling on the computer on which I have 7.4.1...
emmanuel
On Thu, Nov 8, 2012 at 1:08 PM, Ozgur Akgun <[email protected]> wrote:
> fwiw, I am getting a stack trace with 7.6.1.
>
> -- stack.hs
> main = print $ foo [1]
> foo xs = bar xs ++ bar xs
> bar (x:xs) = [x, head xs]
>
> $ ghc -prof -auto-all -rtsopts stack.hs
>
> $ ./stack +RTS -xc
> *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace:
> GHC.List.CAF
> --> evaluated by: Main.bar,
> called from Main.foo,
> called from Main.main,
> called from Main.CAF
> --> evaluated by: Main.main,
> called from Main.CAF
> stack: Prelude.head: empty list
>
>
>
> --
> Ozgur Akgun
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20121108/665fa946/attachment-0001.htm>
------------------------------
Message: 6
Date: Thu, 08 Nov 2012 18:58:42 +0100
From: Nathan H?sken <[email protected]>
Subject: Re: [Haskell-beginners] dynamic set of objects in netwire
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
On 11/07/2012 07:46 PM, Ertugrul S?ylemez wrote:
> Nathan H?sken <[email protected]> wrote:
>
>> I need (in netwire) a way to handle a dynamic set of objects.
>> Therefor I need a way of growing and shrinking the set. Since I have
>> little experience with Haskell and FRP, I would appreciate some input.
>>
>> Shrinking is not problem, as I can just remove wires that inhibit. But
>> how to let the set grow?
>
> Originally the 4.0.0 release should include the manager wire, but I have
> long tried to come up with an interface that is generic enough to fit in
> as many situations as possible.
>
> The most obvious interface is through input. However, this really only
> works when only the user of the manager should be able to add or remove
> subwires. The interface is as simple as something like this:
>
> data MgrMsg k e m a b =
> Add k (Wire e m a b) |
> Delete k
>
> managerBasic ::
> (Monad m, Monoid b, Ord k) =>
> Wire e m (a, [MgrMsg k e m a b]) b
Mmh, how could you (form the outside) connect the output to the
induvidual managed wires?
Let's say I from one of the values in the output "b" I decide I want to
delete the corresponding wire? I need to know the key "k". OK, I could
encode "k" in the output but should I then not explicitly return "k"
with it?
Regards,
Nathan
------------------------------
Message: 7
Date: Thu, 8 Nov 2012 21:49:46 +0100
From: Emmanuel Touzery <[email protected]>
Subject: Re: [Haskell-beginners] exceptions and stacks
To: [email protected]
Message-ID:
<CAC42Re=_bbzph4psovbdq1_a4fxhe8uqxskgm2p3ricj_tu...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Well I recompiled but now I don't anymore have the input data to reproduce
the problem. However if I hit control-c during the runtime, i get a very
nice, and very big, stack, so i think it would work. So, great! Just be
sure to use ghc 7.4+.
emmanuel
On Thu, Nov 8, 2012 at 6:32 PM, Emmanuel Touzery <[email protected]> wrote:
> Well I tried and it displays the same with GHC 7.4.1.
>
> However this is the output with GHC 7.0.4:
> <GHC.List.CAF>stack: Prelude.head: empty list
>
> So this is supported from 7.4 onwards (well maybe 7.2, I guess that
> version existed).
>
> So there are all the chances that with GHC 7.4.1 I would get a proper
> stack for my problem. I'll try it soon but I must reinstall all the
> libraries with profiling on the computer on which I have 7.4.1...
>
> emmanuel
>
> On Thu, Nov 8, 2012 at 1:08 PM, Ozgur Akgun <[email protected]> wrote:
>
>> fwiw, I am getting a stack trace with 7.6.1.
>>
>> -- stack.hs
>> main = print $ foo [1]
>> foo xs = bar xs ++ bar xs
>> bar (x:xs) = [x, head xs]
>>
>> $ ghc -prof -auto-all -rtsopts stack.hs
>>
>> $ ./stack +RTS -xc
>> *** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace:
>> GHC.List.CAF
>> --> evaluated by: Main.bar,
>> called from Main.foo,
>> called from Main.main,
>> called from Main.CAF
>> --> evaluated by: Main.main,
>> called from Main.CAF
>> stack: Prelude.head: empty list
>>
>>
>>
>> --
>> Ozgur Akgun
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20121108/e1f2c64a/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 53, Issue 13
*****************************************