<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi, John.<br>I
am sending you this second email because the first one has a worng paste.&nbsp; However, if I use the right input, I gent the same error. In fact, it gives exactly the same error for any input, right or wrong.&nbsp; <br><br>{- file: tree.hs -}<br>{- compile: jhc tree.hs -dc -o
 jtree }<br>import System (getArgs)
<br>import System.IO
<br>import IO
<br>&nbsp;<br>data Op = AND | OR | NOT deriving (Show, Read)
<br>&nbsp;&nbsp;&nbsp;
<br>data Tree= L Int | T Op [Tree] deriving (Show, Read)&nbsp;
<br>&nbsp;<br>main= do
<br>&nbsp; putStrLn "Give me a tree:"
<br>&nbsp; s &lt;- getLine<br>&nbsp; let xx= read s<br>&nbsp; putStrLn (show (xx::Tree))<br>&nbsp;&nbsp;&nbsp; <br><br>Here is what happens when I try to run it:<br><br>philip@desktop:~/jhctut$ ./jtree<br>Give me a tree:<br>T AND [L 1, L 2]<br><br>jtree_code.c:2670: case fell off<br>Aborted<br><br>It gives the same error for any input:<br><br>philip@desktop:~/jhctut$ ./jtestarbo<br>Give me a tree:<br>fdsfkldkl<br><br>jtestarbo_code.c:2670: case fell off<br>Abortado<br><br><br>It seems that the problem is in the Read class, since it works if I use the Show class only:<br><br>import System (getArgs)
<br>import System.IO
<br>import IO
<br>&nbsp;<br>data Op = AND | OR | NOT deriving (Show, Read)
<br>&nbsp;&nbsp;&nbsp;
<br>data Tree= L Int | T Op [Tree] deriving (Show, Read)&nbsp;
<br>&nbsp;<br>main= do
<br>&nbsp; putStrLn "Give me a tree:"
<br>&nbsp; s &lt;-
 getLine<br>&nbsp; let xx= T AND [L 1, L 2]<br>&nbsp; putStrLn (show (xx::Tree))<br><br>I hope you can fix it.<br><br><br><br><br><br>--- On <b>Wed, 11/11/09, John Meacham <i>&lt;john@repetae.net&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: John Meacham &lt;john@repetae.net&gt;<br>Subject: Re: [Haskell-cafe] Opinion about JHC<br>To: haskell-cafe@haskell.org<br>Received: Wednesday, November 11, 2009, 1:37 AM<br><br><div class="plainMail">On Tue, Nov 10, 2009 at 07:41:54PM -0800, Philippos Apolinarius wrote:<br>&gt; I discovered a Haskell compiler that generates very small and fast<br>&gt; code. In fact, it beats Clean. It has the following properties:<br><br>Excellent. that was my goal ;)<br><br>&gt; 1 --- One can cross-compile programs easily. For instance, here is how I generated code for Windows:<br>&gt; <br>&gt; jhc --cross -mwin32 genetic.hs -o genetic<br><br>Yup.
 This was a major goal. compiling for iPhones and embedded arches is<br>just as easy assuming you have a gcc toolchain set up. (at least with<br>the hacked iPhone SDK.. I have never tried it with the official one)<br><br>&gt; <br>&gt; 2 -- It seems to be quite complete.<br>&gt; <br>&gt; 3 -- However, it often compiles a file, but the program fails to run.<br>&gt; <br>&gt; I have the following questions about it:<br>&gt; <br>&gt; 1 -- How active is the team who is writing the JHC compiler?<br><br>Hi, I am the main contributor, but others are welcome and several have<br>made signifigant contributions. Development tends to be spurty. A lot of<br>work will get done in a short amount of time, this generally corresponds<br>to when an external contributor gets involved and the back and forth<br>helps stimulate patches on my part to complement theirs.<br><br>Although I have not been able to devote a lot of my time to jhc in the<br>past, hopefully this will
 change in the not to distant future and I will<br>be able to work on it full time. <br><br><br>&gt; 2 -- Is it complete Haskell? The author claims that it is; it compiled<br>&gt; all programs that I wrote, but that does not mean much, because my<br>&gt; programs are quite simple.<br><br>It does Haskell 98 and several extensions, which is pretty much what GHC<br>does. However, it does not implement the same set of extensions as GHC<br>so this causes issues as a lot of people use GHC extensions extensively. <br><br>I plan on supporting all of Haskell' of course, and the popular GHC<br>extensions to help compatibility. Not all are implemented. <br><br>&gt; 3 -- Why the Haskell community almost never talks about JHC?<br><br>Part of it is that I am not very good at advocacy. I don't always<br>post announcements on the main haskell lists figuring the interested<br>parties are on the jhc list already. I do try to make jhc good, fast,<br>and usable, I always
 hoped someone better at advocacy than me would join<br>the project :) In truth, I think the spurty nature of development also<br>affects this, the list will be quite for a long time with a flurry of<br>development lasting a few weeks occasionally inspiring some discussion<br>in the other groups.<br><br>In any case, I am glad you liked what you found! please join the mailing<br>list for jhc if you are interested in its development or using it.<br><br>&nbsp; &nbsp; &nbsp; &nbsp; John<br><br><br><br>-- <br>John Meacham - ⑆repetae.net⑆john⑈ - <a href="http://notanumber.net/" target="_blank">http://notanumber.net/</a><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe"
 target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></blockquote></td></tr></table><br>
      <p class="MsoNormal"> </p>

  <tbody><tr>

    <td style="padding: 0.75pt;">

    <div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

    <hr align="center" size="1" width="100%">

    </span></font></div>

 

      <p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><img id="_x0000_i1026" src="http://us.i1.yimg.com/us.yimg.com/i/ca/iotg_search.jpg" align="absbottom" border="0" height="25" hspace="4" width="25"><a href="http://ca.toolbar.yahoo.com/" target="_new"><b><span style="font-weight: bold;" lang="NO-BOK">Yahoo! 
        Canada Toolbar :</span></b><span lang="NO-BOK"> Search from anywhere on 
        the web and bookmark your favourite sites. Download it now! </span></a> 
        </span></font><span lang="NO-BOK"><o:p></o:p></span></p>