FWIW, I just compiled JHC 0.7.2 with ghc 6.12 , doing a couple of corrections to make it compile, which I don't think they are related to this *bug*. Testing the given code, it aborts for every inputs I give it "L 1", " T AND [L 1,L 2]" included. I couldn't make it compile using function "reads" instead.
paolino 2009/11/11 Ross Mellgren <[email protected]> > According to the paste you gave for the JHC test run: > > Here is what happens when I try to run it: > > phi...@desktop:~/jhctut$ ./jtree > Give me a tree: > T AND (L 1, L 2) > > jtree_code.c:2670: case fell off > Aborted > > You gave it parens not square brackets. > > -Ross > > On Nov 11, 2009, at 11:45 AM, Philippos Apolinarius wrote: > > > you declared 'T Op [Tree]' so you should give 'T AND [L 1, L 2]' > > as the tree, right? > Hi, Felipe. > You are right. This means that I gave the correct input to the program. As > you can see, I typed 'T AND [L 1, L 2]'. Therefore, JHC was expected to > parse and print it. However, it failed to parse it. The program works > perfectly well in GHC. Here is the GHC output: > > > phi...@desktop:~/jhctut$ ghc tree.hs --make > [1 of 1] Compiling Main ( tree.hs, tree.o ) > Linking tree ... > > phi...@desktop:~/jhctut$ ./tree > Give me a tree: > T AND [L 1, L 2] > T AND [L 1,L 2] > > --- On *Wed, 11/11/09, Felipe Lessa <[email protected]>* wrote: > > > From: Felipe Lessa <[email protected]> > Subject: Re: [Haskell-cafe] Problem with JHC > To: [email protected] > Received: Wednesday, November 11, 2009, 6:23 AM > > On Wed, Nov 11, 2009 at 04:32:05AM -0800, Philippos Apolinarius wrote: > > data Op = AND | OR | NOT deriving (Show, Read) > > data Tree= L Int | T Op [Tree] deriving (Show, Read) > > Hmm, you see, > > > phi...@desktop:~/jhctut$ ./jtree > > Give me a tree: > > T AND (L 1, L 2) > > > > jtree_code.c:2670: case fell off > > Aborted > > you declared 'T Op [Tree]' so you should give 'T AND [L 1, L 2]' > as the tree, right? > > -- > Felipe. > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > > > ------------------------------ > Get the name you've always wanted <http://ca.promos.yahoo.com/jacko/>! *@ > ymail.com *or *[email protected]* > ._______________________________________________ > > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > > > > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
