<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners">
    <title>gmane.comp.lang.haskell.beginners</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9922"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9921"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9920"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9919"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9918"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9916"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9915"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9914"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9913"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9912"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9911"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9910"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9909"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9908"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9907"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9906"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9905"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9904"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9903"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9902"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9922">
    <title>Re: change to wikibook?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9922</link>
    <description>&lt;pre&gt;&lt;/pre&gt;</description>
    <dc:creator>Gregg Lebovitz</dc:creator>
    <dc:date>2012-05-12T20:37:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9921">
    <title>Re: change to wikibook?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9921</link>
    <description>&lt;pre&gt;

If the WikiBook provided that as an example, then it's buggy and someone
should fix it.  This is a longstanding and difficult to fix annoyance of
Haskel's syntax; the parenthese *are* required there.

Briefly:  unary operators don't work very well.  It can't resolve them by
context because it's not impossible for a function to typecheck there
(nobody recommends Num instances for functions, but they're not forbidden
either), and syntactically they conflict with sections (resolved in favor
of the unary op, with the result that there's a function "subtract" that
exists just to facilitate the (`subtract` 1) section.)  What this adds up
to is that you should be very careful around "-" because it's trying to
satisfy too many mutually incompatible pieces of syntax.

&lt;/pre&gt;</description>
    <dc:creator>Brandon Allbery</dc:creator>
    <dc:date>2012-05-12T20:35:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9920">
    <title>Re: change to wikibook?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9920</link>
    <description>&lt;pre&gt;
Exactly.  This is a rather ugly corner of Haskell's lexical syntax,
but it matches the official specification.  Negative numbers often
require parentheses around them so that the negation symbol does not
parse as subtraction.

If the wikibook itself actually lists "abs -10" as an example for you
to try out, it should be fixed.

-Brent

&lt;/pre&gt;</description>
    <dc:creator>Brent Yorgey</dc:creator>
    <dc:date>2012-05-12T20:35:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9919">
    <title>change to wikibook?</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9919</link>
    <description>&lt;pre&gt;I was wondering if someone could explain this error? I typed in the sample
code from the Haskell Beginning Wikibook to define a function for absolute
value. I have GHC 7.0.4 for OSX. The error went away when I put parentheses
around the negative value, so did the Haskell interpreter think I was
entering - and a second argument, namely 10, when the parentheses weren't
there? Thank you!

*Main&amp;gt; let abs x = if x &amp;lt; 0 then -x else x
*Main&amp;gt; abs 5
5
*Main&amp;gt; abs -10

And got the following error
&amp;lt;interactive&amp;gt;:1:6:
    No instance for (Num (a0 -&amp;gt; a0))
      arising from the literal `10'
    Possible fix: add an instance declaration for (Num (a0 -&amp;gt; a0))
    In the second argument of `(-)', namely `10'
    In the expression: abs - 10
    In an equation for `it': it = abs - 10
&lt;/pre&gt;</description>
    <dc:creator>Ashley Smith</dc:creator>
    <dc:date>2012-05-12T20:15:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9918">
    <title>Re: ANNOUNCE: Haskell Communities and Activities Report (22nd ed., May 2012)</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9918</link>
    <description>&lt;pre&gt;On Sat, May 12, 2012 at 12:45 AM, Janis Voigtländer
&amp;lt;jv&amp;lt; at &amp;gt;informatik.uni-bonn.de&amp;gt; wrote:

Thank you very much, Janis. Great work once again!

Cheers,
  Andres

&lt;/pre&gt;</description>
    <dc:creator>Andres Löh</dc:creator>
    <dc:date>2012-05-12T08:07:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9916">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9916</link>
    <description>&lt;pre&gt;
A 07/05/2012, às 13:12, Heinrich Apfelmus escreveu:


Thanks, mapAccum is what I was missing. 

best,
Miguel
&lt;/pre&gt;</description>
    <dc:creator>Miguel Negrao</dc:creator>
    <dc:date>2012-05-08T20:03:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9915">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9915</link>
    <description>&lt;pre&gt;
You can reformulate this function in terms of the  mapAccum  combinators 
from Data.List. Once you have done this, you can easily adapt it to the 
  mapAccum  combinator from reactive-banana.

   test :: Event t Double -&amp;gt; Event t Double
   test e = filterJust $ fst $ mapAccum Nothing $ next &amp;lt;$&amp;gt; e
       where
       next x Nothing          = (Just x, Just x)
       next x (Just lastValue) =
           let y = if lastValue&amp;gt;=0.8 then x else 1.0-x
           in if (y&amp;lt;=0.2) || (y&amp;gt;=0.8)
               then (Just y , Just y)
               else (Nothing, Just lastValue)


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


_______________________________________________
Beginners mailing list
Beginners&amp;lt; at &amp;gt;haskell.org
http://www.haskell.org/mailman/listinfo/beginners
&lt;/pre&gt;</description>
    <dc:creator>Heinrich Apfelmus</dc:creator>
    <dc:date>2012-05-07T12:12:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9914">
    <title>Re: Haskell as a useful practical 'tool' forintelligent non-programmers</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9914</link>
    <description>&lt;pre&gt;
A 29/04/2012, às 19:43, Ertugrul Söylemez escreveu:


Yes ! As someone who studied pure maths for 6 years, Haskell seems so natural and elegant to me, yet so alien to about everyone else I know that are very good coders already in other languages. When I’m reading about Haskell, I’m constantly like “yeah, that’s like it’s done in mathematics !”, the type of discourse is the same, the same relentless obsession with finding more general models of things, getting what are the fundamental properties of something and then generalizing (what is an open set ? -&amp;gt; topology, what is summing ? group theory, algebras, etc ) until you hit the stratosphere (category theory...).  
Specially since discovering functional programming I have a hard time coding in imperative languages because my times studying math refined my taste for elegance and I find it quite rare to find elegance or beauty in imperative code, where I find it a lot in functional code. In the end for me it has really become an aesthetic choic&lt;/pre&gt;</description>
    <dc:creator>Miguel Negrao</dc:creator>
    <dc:date>2012-05-06T19:49:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9913">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9913</link>
    <description>&lt;pre&gt;A 06/05/2012, às 14:31, Heinrich Apfelmus escreveu:

Ok, this should demonstrate an example of what I mean:

module Main where

main :: IO()
main = print $ test [0.9,0.1,0.2,0.8]
--should output [0.9,0.1,0.8,0.8]

test :: [Double]-&amp;gt;[Double]
test (x:xs) = x : test1 xs x
test [] = []

test1:: [Double]-&amp;gt;Double-&amp;gt;[Double]
test1 (x:xs) lastValue = let
y = if lastValue&amp;gt;=0.8 then x else 1.0-x
in if (y&amp;lt;=0.2) || (y&amp;gt;=0.8) then y : test1 xs y else test1 xs lastValue
test1 [] _ = []   

best,
Miguel Negrão
&lt;/pre&gt;</description>
    <dc:creator>Miguel Negrao</dc:creator>
    <dc:date>2012-05-06T19:35:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9912">
    <title>A wikipedia episode guide parser. [code reviewrequest]</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9912</link>
    <description>&lt;pre&gt;I have written my first piece of haskell code which I'm, to be honest, not
too proud of. I have used the  tag soup library to parse and manipulate the
wikipedia episode list page such as:

http://en.wikipedia.org/wiki/List_of_Weeds_episodes

 to scrape some of the episode information and place it in to a series of
data structures. Nothing too complicated.

I know there are probably better libraries out there, I know of HXT and
others but it uses arrows and I want to start getting to know the basics
before moving on to that. The main point here being that I'm not to
interested in the library I used but the code I produced with it.

My main concern is in the layout of the code. It needs to keep state and
I'm aware of the state monad but is it a good idea to push all of the code
in to the state monad and restructure it that way or is that too complex
for what I do. I'm not really sure how else I could refactor it but any
suggestions on how to improve would be great.

The code is here:

http://pastebin.com/409SL&lt;/pre&gt;</description>
    <dc:creator>Thomas Nickson</dc:creator>
    <dc:date>2012-05-06T18:07:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9911">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9911</link>
    <description>&lt;pre&gt;
Ah, ok, then I don't understand your specification.

Could you give a specification in terms of a simple list transformation

    example :: [Double] -&amp;gt; [Double]

? All list functions are allowed, we can then transform it into a style 
that uses only the combinators available in reactive-banana.


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


_______________________________________________
Beginners mailing list
Beginners&amp;lt; at &amp;gt;haskell.org
http://www.haskell.org/mailman/listinfo/beginners
&lt;/pre&gt;</description>
    <dc:creator>Heinrich Apfelmus</dc:creator>
    <dc:date>2012-05-06T13:31:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9910">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9910</link>
    <description>&lt;pre&gt;
A 05/05/2012, às 15:26, Miguel Negrao escreveu:

Actually I just spotted that the filtering should not be done after the “recursive” part. It should be something more like:


best,
Miguel Negrão
&lt;/pre&gt;</description>
    <dc:creator>Miguel Negrao</dc:creator>
    <dc:date>2012-05-06T13:34:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9909">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9909</link>
    <description>&lt;pre&gt;
A 05/05/2012, às 08:40, Heinrich Apfelmus escreveu:


ok, I will study that.

Hum, that’s not exactly what I wanted. So if it’s the first event just let it through, and then filter it. If it’s not the first event, then do the inversion (1-x) or not depending on the last outputted value, and then filter it.
An input of 
[[0.9],[0.5],[0.1],[0.9],[0.9]]
should produce
[[0.9],[],[0.9],[0.1],[0.9]]

The following code is not correct but it’s closer to what I described:

module Main where

import Reactive.Banana
   
main :: IO()
main = do
        list &amp;lt;- interpretModel example [[0.9],[0.3],[0.4],[0.15],[0.87]]
        putStrLn $ show list   
  
example :: Event t Double -&amp;gt; Event t Double
example e = filterede2
        where
        filterede2 = filterE (\x-&amp;gt;between x 0.0 0.2 &amp;amp;&amp;amp; between x 0.8 1.0)  e2
        e2 = f &amp;lt;$&amp;gt; bIsFirst &amp;lt;&amp;lt; at &amp;gt;&amp;gt; e &amp;lt;&amp;lt; at &amp;gt;&amp;gt; e2

        bIsFirst = stepper True $ False &amp;lt;$ e

        between x a b = a &amp;lt; x &amp;amp;&amp;amp; x &amp;lt; b

        f True x y = x
        f False x y
                | between y 0.8 1.&lt;/pre&gt;</description>
    <dc:creator>Miguel Negrao</dc:creator>
    <dc:date>2012-05-05T14:26:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9908">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9908</link>
    <description>&lt;pre&gt;
The standard way to do recursion in reactive-banana is to use multiple 
recursion between a  Behavior  and an  Event . See also

   http://stackoverflow.com/a/7852344/403805

Note that the specification you gave does not require recursion, though. 
Here an implementation of your example.

     import Reactive.Banana

     example :: Event t Double -&amp;gt; Event t Double
     example e = filterJust e2
         where
         e2 = f &amp;lt;$&amp;gt; bIsFirst &amp;lt;&amp;lt; at &amp;gt;&amp;gt; e

         bIsFirst = stepper True $ False &amp;lt;$ e

         between x a b = a &amp;lt; x &amp;amp;&amp;amp; x &amp;lt; b

         f True x
             | between x 0.8 1.0 = Just $ 1 - x
             | otherwise         = Just $ x
         f False x
             | between x 0.8 1.0 = Just $ x
             | between x 0.0 0.2 = Just $ x
             | otherwise         = Nothing

Here an example output

     GHCi&amp;gt; interpretModel example [[0.9],[0.3],[0.4]]
     [[9.999999999999998e-2],[],[]]




Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


_______________________________________&lt;/pre&gt;</description>
    <dc:creator>Heinrich Apfelmus</dc:creator>
    <dc:date>2012-05-05T07:40:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9907">
    <title>Re: Signals and external bindings...</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9907</link>
    <description>&lt;pre&gt;On Fri, 4 May 2012 14:19:37 -0400
Brandon Allbery &amp;lt;allbery.b&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


Ok, now we're just having vocabulary issues. "Signal handler" is used
to mean two different things:

1) Code that runs in the context provided by the OS for handling the
   signal. As you say, this is typically written in C, and has a bunch of
   restrictions on what it can and cannot do.

2) Code that someone writes to be run in response to a signal from the OS.

In C (and presumably C# and C++), the two are identical. The
restrictions may well cause you to write handler-1 code that will be
set an notice of some kind to run code in your main context when it's
convenient. The latter is technically handler-2 code, but calling such
a signal handler isn't common.


I have to wonder how the boehm gc handles such things?


Well, one is provided, and implemented as you describe. Given a
non-trivial runtime for the language, it seems you either have to do
that, or provide a handler-1 environment with so many restrictions
that you can't&lt;/pre&gt;</description>
    <dc:creator>Mike Meyer</dc:creator>
    <dc:date>2012-05-05T03:24:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9906">
    <title>Re: Signals and external bindings...</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9906</link>
    <description>&lt;pre&gt;


OK, looks like that does what I said in my final paragraph (which was
written based on the runtime Signals.c source).

&lt;/pre&gt;</description>
    <dc:creator>Brandon Allbery</dc:creator>
    <dc:date>2012-05-04T20:18:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9905">
    <title>Re: Signals and external bindings...</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9905</link>
    <description>&lt;pre&gt;
Well, there is this:

http://www.haskell.org/ghc/docs/latest/html/libraries/unix-2.5.1.0/System-Posix-Signals.html#g:4

But it's bit short on what exact semantics it provides. It looks like
it uses this chunk of code on GHC (on Posix systems):

https://github.com/ghc/ghc/blob/376210565e4dff2679246c6ebbcdbb3163c9e8a5/rts/posix/Signals.c

Antoine

_______________________________________________
Beginners mailing list
Beginners&amp;lt; at &amp;gt;haskell.org
http://www.haskell.org/mailman/listinfo/beginners
&lt;/pre&gt;</description>
    <dc:creator>Antoine Latter</dc:creator>
    <dc:date>2012-05-04T19:55:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9904">
    <title>Re: Signals and external bindings...</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9904</link>
    <description>&lt;pre&gt;


I'm not sure it *does* run.  That is, I don't think a Haskell-based signal
handler is even possible.  When I talk about Haskell's signal handlers, I
mean C handlers within the GHC runtime.

1.  The GHC runtime only protects garbage collection from signals, it
doesn't protect anything else.  In particular, unless memory allocation is
somehow atomic, a signal arriving while something is doing an allocation
dare not itself do any allocation — which means it can do very nearly
nothing.

2.  Registering a Haskell-based signal handler would be a special case of
arranging for C to call into Haskell code (since that is in fact what it
would be doing; the real signal handler is C invoked from an assembler
trampoline).  As things currently work, this can only be done from calls to
C which suspend the Haskell runtime in a known safe state; asynchronous
signals don't provide any way to arrange this, any more than they insure
C's malloc() arena is consistent or etc.

If a Haskell-hosted signal handler mechanism were&lt;/pre&gt;</description>
    <dc:creator>Brandon Allbery</dc:creator>
    <dc:date>2012-05-04T18:19:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9903">
    <title>Re: Issue installing  reactive-banana-5.0.0.1</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9903</link>
    <description>&lt;pre&gt;Hi,


Ok, I see, yes make sense.

One other question, is it possible in reactive-banana to define “recursive” event streams. For instance consider a stream which receives numbers between 0.0 and 1.0.  If the last outputted value was between 0.8 an 1.0 then output 1-x otherwise output x. After that it only leta numbers through if they are between 0.0 and 0.2 or between 0.8 and 1.0.

 This looks like:

 |
 x
 V
---------------------------
|    y &amp;gt; 0.8                  |&amp;lt;--------------y----------------|
|                                  ||
--------------------------|
|                   ||
| yes           | no|
V                V|
1-x             x |
|                 /|
V              /|
--------------|
||
||
V|
----------------------------------------------------|
|    select values between 0.0 and 0.2  ||
|    and 0 8 and 1.0                                   | |              
|              &lt;/pre&gt;</description>
    <dc:creator>Miguel Negrao</dc:creator>
    <dc:date>2012-05-04T18:15:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9902">
    <title>Re: Signals and external bindings...</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9902</link>
    <description>&lt;pre&gt;It is a tricky subject, but not insurmountable.

    http://blog.ezyang.com/2010/08/interrupting-ghc/
    http://www.haskell.org/ghc/docs/7.2.2/html/users_guide/ffi.html#ffi-interruptible
    http://blog.ezyang.com/2010/11/its-just-a-longjmp-to-the-left/

Cheers,
Edward

Excerpts from Mike Meyer's message of Wed May 02 13:00:41 -0400 2012:

&lt;/pre&gt;</description>
    <dc:creator>Edward Z. Yang</dc:creator>
    <dc:date>2012-05-04T18:12:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9901">
    <title>Re: Signals and external bindings...</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.haskell.beginners/9901</link>
    <description>&lt;pre&gt;On Fri, 4 May 2012 12:54:00 -0400
Brandon Allbery &amp;lt;allbery.b&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


Not quite. What I want is for my code in Haskell or Python to run when
the signal arrives (basically, on the signal handler), as opposed to
waiting until the C code returns control to the Haskell or Python
runtime But that's just the first step.


Well, it's clear to me that what I want to do requires arbitrary
cleanup capabilities. If the C library doesn't provide a mechanism to
shut itself down cleanly, nothing will work.

But I realized I never got a more fundamental question answered: when
does a signal handler written in Haskell run? Is it like C, in that it
runs when the signal arrives, even if I'm currently executing some
wrapped C code, and I have to deal with funky rules about what it can
do? Or is it like Python, and it will run the first time the Haskell
runtime gets control after the signal arrives?

      Thanks,
      &amp;lt;mike
&lt;/pre&gt;</description>
    <dc:creator>Mike Meyer</dc:creator>
    <dc:date>2012-05-04T17:26:44</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.haskell.beginners">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.haskell.beginners</link>
  </textinput>
</rdf:RDF>

